Skip to main content
July 25, 2022
Solved

Not able to Write data into Data Store Entity

  • July 25, 2022
  • 14 replies
  • 2 views

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 ?

Best answer by stefanhelzle0001

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.

14 replies

stefanhelzle0001
Brainy
July 25, 2022

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.

July 25, 2022

Thanks Stefan,

I have added the details.

stefanhelzle0001
Brainy
July 25, 2022

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?

July 26, 2022

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.

harshitb6843
July 26, 2022

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"

July 26, 2022

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

harshitb6843
July 26, 2022

Can you attach the error screenshot?