Skip to main content
April 7, 2021
Solved

Write to Data Store results not saving back to process variable

  • April 7, 2021
  • 5 replies
  • 0 views

I have the Outputs tab of a Write to Data Store Entity setup where AC!StoredValues is stored as the process variable (PV) that I'm inputtingThe data is successfully written into the DB, but the id is not saved back to the PV.

I don't see a "Modify Variable" or similar activity being done after/during the Write to DSE action.

As a workaround, I've made a custom output to store ac!StoredValues.id into a new pv!id. This works and I use a script to save it to the original PV.

Am I missing something in my attempt to save the entire AC!StoredValues into my PV? Like does it need to be cast or only work with certain datatypes?

Best answer by stefanhelzle0001

By any chance, how is your setup on the inputs tab? Could it be that you defined a save into for the data to be stored? If yes, remove this as it will conflict with the output definition.

5 replies

danny.verb
April 7, 2021

As long as your process variable is of the same data type you're writing to the database it should work. One thing to check is to make sure on the CDT you have your primary key set to auto-increment

April 7, 2021

All of those have check out. CDT and Cloud DB table have the primary key set to auto increment.

stefanhelzle0001
Brainy
April 7, 2021

By any chance, how is your setup on the inputs tab? Could it be that you defined a save into for the data to be stored? If yes, remove this as it will conflict with the output definition.