Not able to write the logic in ajo expression editor for a scenario where we are checking for all events with some filters and after filtering we need to check for one more object array to match specific values. | Community
Skip to main content
Level 2
March 10, 2026
Question

Not able to write the logic in ajo expression editor for a scenario where we are checking for all events with some filters and after filtering we need to check for one more object array to match specific values.

  • March 10, 2026
  • 1 reply
  • 20 views

Hi , 

we need  help on the below issue .

I am not  able to write the logic in ajo expression editor for a scenario where we are checking for all events with some filters and after filtering we need to check for one more object array to match specific values.PFB sample code which i am not able to do in ajo.

!--scriptorstartfragment-->

count(#{

  <PLATFORM_NS>.<DATASET_ALIAS>.experienceevent.all(

 

    toInteger(

      replaceAll(

        substr(toString(currentDataPackField.<TENANT_NS>.Info1.scheduledDate), 0, 10),

        "-",

        ""

      )

    ) >=

    toInteger(

      replaceAll(

        substr(toString(nowWithDelta(-30, "days")), 0, 10),

        "-",

        ""

      )

    )

 

    and

 

    (

      (

        in(

          currentDataPackField.<TENANT_NS>.info.code,

          ['1111111','1111112','1111113','1111114']

        )

        and currentDataPackField.eventType == 'mail.Custom'

      )

     

    )

 

    and

 

    listSize(

      filter(

        currentDataPackField.<TENANT_NS>.extAttributes.customList,

        x -> x.name == 'CustomKey02'

             and x.value ==

               @event{<OTHER_EVENT_ALIAS>.<TENANT_NS>.Domain1.aaa.check1.Id}

      )

    ) > 0

 

  )

}) < 1!--scriptorendfragment-->

 

 

I am not getting a solution on how to iterate in customList object array to compare 'CustomKey02’ value  with the incoming event payload value after all the conditions are satisfied.

 

Thanks

Usha.

 

 

    1 reply

    Mohan_Dugganab
    Adobe Employee
    Adobe Employee
    March 10, 2026

    Your scenario looks closer to this example https://experienceleague.adobe.com/en/docs/journeys/using/building-advanced-conditions-journeys/syntax/collection-management-functions

     

    #{ExperiencePlatform.ExperienceEventFieldGroup.experienceevent.last(
    currentDataPackField.eventType == "commerce.productListAdds").productListItems.last(currentDataPackField.priceTotal >= 150 and currentDataPackField.value == @eventAttribute

    ).name}

     

    Are you running into an error ?