Skip to main content
swapnar6405
February 16, 2023
Solved

Writing multiple rows of data using Write to Data Store Entity

  • February 16, 2023
  • 3 replies
  • 0 views

Hi,

I need to store multiple records in a single table of the database.

Is this possible using "Write to Data Store Entity" or do I need to use "Write to Multiple Data Store Entity".

Thanks

Best answer by davel001150

Make sure that the rule input for your CDT that gets saved has the "Multiple" checkbox checked, both on the write to datastore node and in the definition of the Process Variable.  Either one of those off, and it will treat it as a singular value and boom only 1 row written.

3 replies

February 16, 2023

In this case you're writing multiple records but one table or entity, so Write to Data Store Entity works here.  If you've created a synced record type from this table you also have the choice to use the Write Records smart service instead. 

swapnar6405
February 16, 2023

I  have used "Write to Data Store Entity" in my process model and even though I passed multiple rows of data (database records), only one row of data is getting saved.

Not sure why.

Any idea why it is happening like this. Do I need to use any kind of loop?

davel001150
February 16, 2023

Make sure that the rule input for your CDT that gets saved has the "Multiple" checkbox checked, both on the write to datastore node and in the definition of the Process Variable.  Either one of those off, and it will treat it as a singular value and boom only 1 row written.