IN() doesn't work when looking at a column th...

IN() doesnโ€™t work when looking at a column that is an enumlist? I had assumed that calling an entire column of enumlist would make the list like one big joinโ€ฆ But it doesnโ€™t work. Am I seeing a bug by design, whatโ€™s my options?

Example: table PEOPLE with column [people_uid] (I create a slice for this table to parse it down to just the logged in user, itโ€™s called PEOPLE_THISUSERโ€ฆ I use [people_useremail]=USEREMAIL()โ€ฆ there is also a table PROJECT with enumlist column [project_users]. Iโ€™ve got an action that adds [people_uid] concatenate to a list ", " of allowed users for this project. So, in the PROJECT table security filter I want to sayโ€ฆ IN(ANY(PEOPLE_THISUSER[people_uid]), [project_users])

But it doesnโ€™t work!?

0 6 381
6 REPLIES 6

IN doesnโ€™t automatically flatten nested lists. But ANY(PEOPLE_THISUSER[people_uid]) should select the first value, not a whole column. But I couldnโ€™t quite follow what the value would be, what does the value of [people_uid] look like in that slice? Is that where youโ€™re doing the concatenate?

@Adam_Stone_AppSheet sorry Adam, I know my example was a little nutsโ€ฆ [project_users] would be the lists I need flattenedโ€ฆ

How do I do that?

Not sure if that can be done, maybe some trick with concatenateโ€ฆ if you do Concatenate([project users]) itself, what does the result look like?

@Adam_Stone_AppSheet I just tried it, and it wonโ€™t work since there is no delimiter parameter built in. I think it just throws them all togetherโ€ฆ

Grant, if you are setting up a security filter, donโ€™t you want to say something true/false about each row in it? In this case, something based on the enumlist [project_users] ?

Iโ€™m guessing you want to see if there is any overlap between [project_users] and PEOPLE_THISUSER[people_id]. if so, you want to include the row, and if not, exclude it. Is that correct?

COUNT(SELECT(PEOPLE_THISUSER[people_id], IN([people_id], [_THISROW].[project_users])) > 0

โ€ฆ or something like that?

@praveen Yes, this works!

Top Labels in this Space