I have an integration that I save the output into a DataSubset object and want to use to update a table in the database with a Query Database task.
The DataSubset is as followed:
DataSubset startindex null ... data [List of Dictionary - 1,000 items] Dictionary EMPLOYEE_ID "1" PAY "Hourly" ...
In my Integration task, which is the first task, I save the output to a Result variable (which is type of DataSubset).
Now in the next task, I add a Query Database task that I want to use to update a table where the EMPLOYEE_IDs match
Would it be: "Update users set pay = ac!Result.data.PAY where employee_id = ac!Result.data.EMPLOYEE_ID;"?
This doesn't seem to work. What am I doing wrong or what's the right way?
Discussion posts and replies are publicly visible
Why can’t you use https://docs.appian.com/suite/help/24.3/Write_to_Data_Store_Entity_Smart_Service.html or writeToRecords Smart services. they update the row of you have primary key passed in the parameters for the row.
here2learn said:This doesn't seem to work
This does not provide much details we could somehow try to guess what the issue might be. Can you shed some light on this?
Hello, the query I add as seen in the "Query Database" task does not work, it gives me an error. That's my question, what is the appropriate way to use a List used in the previous task from calling an integration.
Try using write to data store entity smart service
Hi Stefan, what doesn't work is the query I added in the SQL Statement as "UPDATE pay from users where employee_id= ac!Result.data.employee_id;"
Hello Kumar, even if I did, what is the appropriate query to use? I can see where you're going with the smart service, but is my query correct?