What is the index of the first occurrence of value in list (a list that uses delim as the element separator)?
COUNT(
SPLIT(
ANY(
SPLIT(
(delim & list & delim),
(delim & value & delim)
)
),
delim
)
)
For example:
COUNT(
SPLIT(
ANY(
SPLIT(
(" , " & LIST(1, 2, 3, 4, 5) & " , "),
(" , " & 3 & " , ")
)
),
" , "
)
)
Or:
COUNT(
SPLIT(
ANY(
SPLIT(
(" , " & [EnumList] & " , "),
(" , " & [Enum] & " , ")
)
),
" , "
)
)
To extend and alter this expression a bit, we can use as replacement for IN expression ...
contains(
(" , " & [EnumList] & " , "),
(" , " & [Enum] & " , ")
)
Tons of usages with this. I already love this.
Thanks much Steve!! This is very useful, and as usual, I'm enjoying the simplistic creativity in your expressions ๐
An awesome, clever, elegant and impresive idea.
I'm stealing it ๐
Brilliant!
@Steve thank you so much for this. Just used it to make a numbered list in an email template after racking my brain for hours how to get it done. You're the man!
That sure is useful ! Thanks