Hi all,
Before writing a CDT array to the database in my process model, I want to update all elements of the array with a different value. How can I do this?
For example, let's say I have a process variable named pv!myCDT (which is a CDT array) with this value:
{ { name: "Ben", age: 60, retired: false }, { name: "Sam", age: 65 retired: false } }
and I want to update all 'retired' fields to true. How can I do this in a process model? Should I use a script task for this?
I tried using a script task and added a custom output but this only changed the first element. It looked like this:Expression = 'true', Operator = 'is stored as' Target = pv!myCDT.name
Thanks for the help!
Discussion posts and replies are publicly visible
Hi,
Since you data are multiple, you have to use repeat function
Expression = repeat(count(pv!myCDT),'true'), Operator = 'is stored as' Target = pv!myCDT.name
Thanks