Skip to main content
March 12, 2024
Question

To append a new array for each value within an item

  • March 12, 2024
  • 5 replies
  • 0 views

Suppose I have an array with multiple values for key dates:

'type!{urn:com:appian:types}Request'(
'id': "009642",
'status': "Cancelled",

'dates': "05/05/2024, 10/06/2024",
),

'type!{urn:com:appian:types}Request'(
'id': "009641",
'status': "Cancelled",

'dates': "06/15/2024, 02/06/2024, 02/10/2024"
)

I want the result to be such that the dates are individually added and appended having the same data.

so the first array will become

'type!{urn:com:appian:types}Request'(
'id': "009642",
'status': "Cancelled",

'dates': "05/05/2024",
),

'type!{urn:com:appian:types}Request'(
'id': "009642",
'status': "Cancelled",

'dates': "10/06/2024",
),

 

Like this I want to do for all items in that data. Is it possible in appian?

5 replies

stefanhelzle0001
Brainy
March 12, 2024
Like this I want to do for all items in that data.

That sounds like a good case for a foreach.

March 12, 2024

I understand I have to loop through the parent array but for each date how will I append the same data. wont it be slow to use nested foreach. Is there a inbuilt function to do this?

stefanhelzle0001
Brainy
March 12, 2024

Nested foreaches are not a problem in general. If you try to frequently push a larger volume of data through this, you might have to look for a different solution.

Just do a performance analysis with the expected data volume.