10-11-2020 06:24 AM
Dear all
im working with worklow list tryign to make action row that changes a certain column value i tried solutions but non worked
i tried:
update sql in the actionrow it was UPDATE table_name
SET column = value
WHERE id={row.id};
that didn't work it gives me this error
i tried making action trigger and calling it from the list script but it didn't work
please if any steps how can i make that work
10-12-2020 01:11 AM
Since in a list you are not posting data back to the server, you must use an action trigger. To provide the id to the IG.trigger method you will have to use an URL parameter. Here is a sample:
Trigger definition:
<WorkflowTrigger name="DelEmployeeRegion" method="action" type="SqlTrigger"> <Param name="Sql" value="delete from Employee_REGION where REGION_ID={REQUESTCONTEXT.RegionId}" /> </WorkflowTrigger>
Action definition:
action="SCRIPT[IG.trigger({triggerNames:['DelEmployeeRegion'],urlParams:{RegionId:{ROW.Id}}})]"
10-12-2020 05:02 AM
hi
i tried your solution
created sql trigger
and wrote in the sql properity under the object provider
<WorkflowTrigger name="updatee" method="action" type="SqlTrigger">
<Param name="Sql" value="UPDATE agri SET textt = '3' WHERE id = {REQUESTCONTEXT.cid}" />
</WorkflowTrigger>
i didn't know about wht is the provider so i tried it with the 3 options(hasValueProvider - hasNoValueProvider - isInRoleProvider)
i don't know the defferance between them but i tried all of them and it keeps telling me syntax error aroun "OBJECT"
what am i messing please
10-12-2020 05:20 AM
I did not get what you are referring to.
Method must be "action" in the Static Value tab of the value editor. Sql is your SQL statement again in the Static Value tab of the value editor (this will change in the next release, since the proper section would be the Sql tab).