So I have an interface that is saving two array of CDTs the idea I was having is that it would store each iteration of the array into its own respective row for the array example: {[uuid:1, fkuuid: ab32, date: today], [uuid:2, fkuuid: cd43, date: tomorrow]}. In the database there would be a row for UUID 1 and a row for UUID 2 but when I execute the write to data store entry I only get uuid 1. To push this even further I am doing this two times for separate tables and its only putting 1 entry into 1 table.
If there is any more information that is needed let me know! Any Ideas on how to get it to save all the information in the array of cdt to each of its separate rows?
Discussion posts and replies are publicly visible
Hey Kyle,
Are you using the smart service / function of Write to Data store. I assumed smart service
Could you attach some screenshots of the process variable you are trying to save and the configuration of your Write to Data store smart service
Quick thing to check:
- Are you marking the multiple checkbox of the Write to Data store ?
Also, look into the documentation. this could help
https://docs.appian.com/suite/help/21.4/Write_to_Data_Store_Entity_Smart_Service.html
https://docs.appian.com/suite/help/21.4/Write_to_Multiple_Data_Store_Entities_Smart_Service.html
These are my process variables and write to data store entity with the multiple checked on both.
well, you are trying to save multiple different entities (different CDT type) using a 'Write to Data Store Entity'.
This smart service can only write to 1 entity
You would need to use: 'Write to Multiple Data Store Entities'
You can look for an example here:
https://docs.appian.com/suite/help/21.4/Write_to_Multiple_Data_Store_Entities_Smart_Service.html#example-inputs-1
And according to your screenshot
let say if you have 2 Data store entity constants for your entity types
cons!MAP_DSE_PRODUCER - Entity type for CDT Map_Producer
cons!MAP_DSE_DATA_PRODUCER - Entity type for CDT Map_Data_Producer
You should put in the Data tab for 'Value to Store' as:
= { { entity: cons!MAP_DSE_PRODUCER, data: pv!mapProducer }, { entity: cons!MAP_DSE_DATA_PRODUCER, data: pv!mapDataProducer }}
Okay! I will try this and report back my success rate!