Skip to main content
September 30, 2021
Question

How to add rows of value to database

  • September 30, 2021
  • 1 reply
  • 0 views

I have list of value, how to add lists of variables to back end of database, click one button, add or update many rows.

    1 reply

    adityau269
    September 30, 2021

    Do you have the list of values stored in a CDT variable?

    If yes, you can use a!writeDataStoreEntity() in the saveInto parameter of a button to add/update all the rows in the table.

    If you have multiple CDT variables and you need to add/update rows in multiple tables, use a!writeToMultipleDataStoreEntities() in the saveInto parameter of the button. 

    If you do not have the list of values stored in a CDT variable, you can create a stored procedure in your database, pass all your variables to the stored procedure from Appian using the execute stored procedure plugin and let the procedure do all the adds and updates. Call the execute stored procedure plugin on button click. That way, one button click will allow you to add/update multiple rows.