M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 19
Registered: ‎08-04-2020

action row

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

 

 

Staff
Posts: 1,132
Registered: ‎10-18-2015

Re: action row

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}}})]"
Stefano Turcato
Presale Engineer
Hexagon Geospatial
Occasional Contributor
Posts: 19
Registered: ‎08-04-2020

Re: action row

 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

Staff
Posts: 1,132
Registered: ‎10-18-2015

Re: action row

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). 

Stefano Turcato
Presale Engineer
Hexagon Geospatial