I have a JSON file I'm using in a journey via Data Source (called DiasHabiles) and I need to find the position of an specific date:
so for example, I want the position of the date "2026-01-06" which is the position 2
The solution AJO gives is something like this:
getListItem(#{DiasHabiles.diasHabiles.Fecha_Habil},0)
but I need to hardcode the position, and I want to find the position of an specific date in that list.
how can I achieve that? Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
@Silvio6 You can validate it on the lines of the following expression
toString((indexOf(serializeList([
"2026-01-02",
"2026-01-05",
"2026-01-06",
"2026-01-07",
"2026-01-08",
"2026-01-09",
"2026-01-12",
"2026-01-13",
"2026-01-14",
"2026-01-15",
"2026-01-16"], "", false),"2026-01-06"))/(length("2026-01-06"))) // Replace Individual Date and array fields with the respective XDM paths
Views
Replies
Total Likes
@Silvio6 You can validate it on the lines of the following expression
toString((indexOf(serializeList([
"2026-01-02",
"2026-01-05",
"2026-01-06",
"2026-01-07",
"2026-01-08",
"2026-01-09",
"2026-01-12",
"2026-01-13",
"2026-01-14",
"2026-01-15",
"2026-01-16"], "", false),"2026-01-06"))/(length("2026-01-06"))) // Replace Individual Date and array fields with the respective XDM paths
Views
Replies
Total Likes
the key was in "/lenght", amazing solution. Thanks!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies