Hi team, I am unable to write the data in data store entity. Data is getting stored in process variable but when I am trying to store the same process vaiable data into appian db, only auto-generated key value and a new row is getting stored and not the whole data which I am trying to store. Please help me in this regard.
Below is the process model-
For fetch data from API, I have the following configurations as shown in the screenshots below-
I am getting the data as list of texts as you can see in the above screenshot. I have created a CDT from the table. Table and CDT structure can be seen below-
I have created a process variable which can be shown in below screenshot-
Below are the screenshots showing the Write To Data Store Entity node configuration
Now after running the process, the value in the process variable is not getting saved and not in table too. However in the table, blank rows are getting added with a auto generated incremental id.The status of the table can be seen in below screenshot.
Below you can see the running process status screenshots,
Even after checking the "Multiple" option in Write To Data Store Entity node, I am getting the following error on the same node,
Could any one please help in this regard ?
Discussion posts and replies are publicly visible
Can you add the details of the database node? You need to turn that list of strings into a list of that CDT type. I do not see this happen.
Thanks Stefan,
I have added the details.
The "valueToBeStored" should also be a multiple.
Your expression creates a list of text. Where do you turn that into a list of your CDT type?
Could you please show us the process variable of a running instances and also, in write to datastore entity node, for value to store, multiple checkbox should be checked. because you are trying to insert multiple value and the process variable is also of multiple type.
As Stefan said, you need to cast the primitive datatype into a custom data type. In order to save data in the DB, the data should be casted in the corresponding table's CDT. You will need to integrate through the list of text strings that are being generated in your Expression rule and then in the expression part of the loop, you need to construct a CDT using type!Also, because it is multiple, please mark the Process variable and Node Variable as "Multiple"
Thanks,
Do we need to convert it into that CDT? Will it not automatically map ?
Also, could you pls write how casting will be done in this place ?
You need to do that because Appian can not know to which field you want to text be stored to.
Thanks Harshit, I have done the same, but this time I am getting error like length(Data), Also please check the below screenshots for the changes and result