Skip to main content
November 17, 2022
Question

Expression rule a!update function

  • November 17, 2022
  • 3 replies
  • 0 views

Hi Guys!

I have this expression rule:


{
  a!update(
  data: ri!holder.name,
  index: local!indexValue,
  value: "test"
  )
),
  a!update(
  data: ri!holder.age,
  index: local!indexValue,
  value: 23
  )
),
  a!update(
  data: ri!holder.married,
  index: local!indexValue,
  value: true()
    )
  )
}

This is my current process to update the CDT value of ri!holder.name, ri!holder.age, and ri!holder.married
My CDT holder contains: name(array of text), age(array of number), married(array of boolean).

Expected ouput should be:
[name="test",
age=23
married=TRUE]

However Im getting a List of variant where all the values are stored in ri!holder.name:
[name="test";20;TRUE]


Do you have any ideas or suggestion on how to get the expected output?
Thank You!

3 replies

stefanhelzle0001
Brainy
November 17, 2022

a!update returns a copy of the modified data you pass into the data parameter. I think that you need to use it in a different way.

You write that your input data has three field, each is a list of values. The output has to be free fields with a single value for each. Is that correct?

November 18, 2022

Hi Stefan,

Yes you are correct. I want my expression rule that returns or output like in the example below:
[name="test",
age=23
married=TRUE]

Do you have any suggestions?