Iterating array object in condition activity - AJO | Community
Skip to main content
Level 2
October 10, 2023
Solved

Iterating array object in condition activity - AJO

  • October 10, 2023
  • 1 reply
  • 3576 views

Hello All,

 

I have a requirement to get an event attribute(date field) say 'abc_date' and I have an array object say 'mycollection[]' inside an individual record schema,  this array object has a date field mycollection_date. I need to iterate through this array and get the item from the array which has mycollection_date =  abc_date and if it matches, I want to finally retrieve another boolean field eg mycollection_boolfield from that item with the matching dates and check if the field is true or false.This should be done in a condition activity within a journey

As I see that condition activity in AJO does not support function like each, if else  to iterate and get the required item, is there any way to achieve this ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mohan_Dugganab

@ngd_11 you can leverage the collection management functions to filter through an array and get to the desired value https://experienceleague.adobe.com/docs/journey-optimizer/using/orchestrate-journeys/building-advanced-conditions-journeys/syntax/collection-management-functions.html?lang=en

1 reply

SatheeskannaK
Community Advisor
Community Advisor
October 10, 2023

@ngd_11, You can use advanced mode within condition activity to define if else conditions. Take a look at this documentation,

https://experienceleague.adobe.com/docs/journey-optimizer/using/orchestrate-journeys/building-advanced-conditions-journeys/syntax/conditional-instruction.html?lang=en

Thanks, Sathees
ngd_11Author
Level 2
October 11, 2023

@satheeskannak  Thank you for the response. That helps,  but can you please let me know if there is a way to iterate through an array object attribute (of individual schema) inside a condition activity ?

Sukrity_Wadhwa
Community Manager
Community Manager
October 31, 2023

Hi @satheeskannak,

Can you please help @ngd_11 further with their query?

Thanks!

Sukrity Wadhwa