Return an Index position from a list - Workaround available

Hi all,

I have a List of values in a virtual column:
0.18 , 0.28 , 0.34 , 0.36 , 0.37 , 0.8 , 0.86 , 0.89 , 0.97 , 1.24 , 1.92 , 3.18 , 3.87

I want to do a lookup of values and want to extract the position of this value in this list.
For example: If I do a lookup in the list of the value 0,34 I need the value 3 in return (as 0,34 is the 3rd. position in the List).

This is obviously not possible with standard column expressions. Are there any possible workarounds to get this managed?

Thank you and br.
Robert

Solved Solved
1 9 791
1 ACCEPTED SOLUTION

inside the LEN(), wrap your column with CONCATENATE() - that should convert it to the correct type.

  • You might want to do that in the FIND() as well.

View solution in original post

9 REPLIES 9

You may wish to take a look at the following post thread.

Senior community colleagues like @tsuji_koichi and @Aleksi have shared their insights.

Hi Suvrutt,

when I use your Expression i get the following error:

3X_4_e_4e948f4f74d94813f4077ba22dded7ea76c9affd.png

I quickly did a test and it is perfectly working for me.

Please ensure the [Pz_Kinn] is a text type column and [Priority] is a list or enumlist type of column.

The expression showing correct for IndexOf column. The expression is searching for โ€œCherryโ€ in [AllProduct] column a VC of list type.

Result in the app

A complicated little bit of formula magic, but something that Iโ€™ve shared in the expression library at AppSheetTraining.com

Hereโ€™s the formula:

count(
 split(
   left(
 concatenate([Walkthrough_Link].[Walkthrough_Elements]),
 find(
   [ElementID],
concatenate([Walkthrough_Link].[Walkthrough_Elements])
 ) + 7
),
 " , ") - list("")
)

Hereโ€™s the video I made explaining it:

Hello,

thank you for your reply, whe I use your expression I get the following error:

3X_d_5_d5cdb6aa8a4bbc11954fc422ff0fd08315cd4353.png

[Priority] is the List with values
PZ-Kinn = the column with value to lookup for in the List

inside the LEN(), wrap your column with CONCATENATE() - that should convert it to the correct type.

  • You might want to do that in the FIND() as well.

Hereโ€™s a link to a general post about this topic:

Top Labels in this Space