Suppose I have an array with multiple values for key dates:'type!{urn:com:appian:types}Request'( 'id': "009642", 'status': "Cancelled",
'type!{urn:com:appian:types}Request'(
'id': "009642",
'status': "Cancelled",
'dates': "05/05/2024, 10/06/2024", ),
'dates': "05/05/2024, 10/06/2024",
),
'type!{urn:com:appian:types}Request'('id': "009641",'status': "Cancelled",
'id': "009641",
'dates': "06/15/2024, 02/06/2024, 02/10/2024" )
'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",),
'dates': "05/05/2024",
'dates': "10/06/2024",),
'dates': "10/06/2024",
Like this I want to do for all items in that data. Is it possible in appian?
Discussion posts and replies are publicly visible
ashhar said:Like this I want to do for all items in that data.
That sounds like a good case for a foreach.
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?
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.
Yes that's the concern, I am dealing with a large dataset.
How large? Appian is not made to process large data volumes in expressions. I consider numbers of below 100 as no issue, below 1000 as a potential problem, below 10,000 a serious issue, and a no-go above.