Dear all,
I would like to make a quick update to just one database column and trying to use the Write to Database smart service, I am required to populate all the other fields. Because I do not need to start getting all the other fields just so I can update on field, I am trying to use the Query Database smart service instead.
I have the following simple database update query:
UPDATE cshvcashadvancedata SET currentstatus = "Manager Rework -test has worked" WHERE id = ac!requestId
In the setup tab, I defined the above query.
In the data input tab, I added an ac (see screenshot below). However, the database update is not getting performed. I also noticed that Appian automatically added a new input node - ~1.requestId (I'm not sure what that is for).
Is there anything I am missing?
Thanks
Discussion posts and replies are publicly visible
Hi Susan, As other suggested, please follow the below steps (1) Use Write to Data Store Entity Smart Service instead of Query Database.
(2) To update specific columns, please create a CDT and specify the <xsd:element> for those columns (not all). While creating this CDT, the primary key should not have anotation @GeneratedValue.
(3) Use this CDT in the Smart Service and map the columns values to the respective ac!variable. Also, map the primary key value. So the compiler will know that this is an update not an insert. Hope this helps!!! Thanks, Farnaz