Is is possible to update multiple fields of a CDT using the a!update()? The documentation shows that you can for a regular array, but with the CDT examples shown, it only updates one field at a time. When I test it out in an expression, it throws an error. I just want to check that I'm not missing anything here.
e.g.
a!update( data: ri!submission, index: {"StatusID", "SubmissionTypeID"}, value: {1, 2} )
error thrown: Expression evaluation error at function a!update: Invalid index: cannot index multiple indices of type List of Text String into type CRA_T_Submission
Discussion posts and replies are publicly visible
You can use fn!reduce() in the same way you would with any list that you want to process against an initial value:
fn!reduce( a!update, ri!submission, fn!merge( {"StatusID", "SubmissionTypeID"}, {1, 2} )
...but I take your point, it seems odd/inconsistent that it natively processes a list for maps but not for Dictionaries or CDTs.
I mean, if you have to pull in (two[!!]) primitive looping/array functions to make one of the most basic use cases work, to me that defeats the entire purpose of the new Update function, when compared to updateDictionary() which works just fine in one step.