Database Insert using Write to Data Store Entity Smart Service

Hi All,

I have had good success using the Write to Data Store Entity Smart Service to INSERT rows into database tables using CDTs. I thought there will be an Update Database Smart Service just like there is a Delete from Data Store Entity but I read on Appian documentation that the Write to Data Entity is the same smart service used to UPDATE database rows. I also tried to find examples without success.

The Write to Data Store Entity accepts a Data Store Entity node input but I am having a hard time finding the parameter where I can specify the id for the primary key of the table and also I cannot see the parameter where I can specify which column in the database I want to update, and lastly the new value.

As an example, my CDT looks like this:

id,
department,
type,
currentStatus

For the above CDT, I am trying to set the value of currentStatus to "Initiator Rework" for the row with id coming from pv!requestData.requestId. How can I configure the Write To Data Store Entity to achieve this?

Thanks

  Discussion posts and replies are publicly visible

Parents
  • Write to datastore entity has a datastore entity input and u can create a CDT input which corresponds to the entity. Make sure that you have added an annotation @Id in your CDT which defines a column as a primary key in the table while any CRUD operations are done in Appian through CDT else Appian creates an identifier or primary key in your table which you would be able to check in DB but would not be able to retreive that in Appian and hence would not be able to either delete or update that record.
Reply
  • Write to datastore entity has a datastore entity input and u can create a CDT input which corresponds to the entity. Make sure that you have added an annotation @Id in your CDT which defines a column as a primary key in the table while any CRUD operations are done in Appian through CDT else Appian creates an identifier or primary key in your table which you would be able to check in DB but would not be able to retreive that in Appian and hence would not be able to either delete or update that record.
Children
No Data