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.
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.