Hello, really need some help.
I have a user table with a manually added list of โresource idsโ that they will be allowed to update.
Then I have a table of Scope items with the โlist of resource idsโ that will be used for that scope item.
I was trying to drop an INTERSECT in the security filter, and Iโve even tried count, and iโm just not getting anywhereโฆ Itโs starting to feel buggy
ISNOTBLANK(
INTERSECT(
LIST()+[_THISROW].[scope_metadata_list],
LIST()+USERPERM_CURRENT[userperm_ANY_tags]
)
)
Also here is a video of my setup if you think it will help. @Steve I know youโve been hitting this particular area hard, and even alerted me of the bug. Do you have any input?
I would try CONTAINS () - it works better than IN, INTERSECT etc. in security filters.
Wait, I take that back; it wonโt work since you have two lists.
@Grant_Stead I checked with ISNOTBLANK(INTERSECT(LIST()+[LIST],LIST()+Test2[NAME])) where the [LIST] is EnumList with the column type Text and the [NAME] is text type as well. And it works just fine. Please check your column types.
They are both marked enumlist with a ", " separator.
Here is the USERPERM_CURRENT Slice data:
With NO security filter here is the โlist of resourcesโ in scopeโฆ
I will check your test appโฆ
Try:
ISNOTBLANK(
INTERSECT(
LIST() + [_THISROW].[scope_metadata_list],
LIST() + SPLIT(USERPERM_CURRENT[userperm_ANY_tags], " , ")
)
)
What I still donโt understand is why I canโt go ANY(enumlist_column)
ISNOTBLANK(
INTERSECT(
LIST() + [scope_metadata_list],
LIST() + ANY(USERPERM_CURRENT[userperm_ANY_tags])
)
)
As far as I can determine, ANY() wants to return one value, period, so it forces a List or EnumList to Text. I wonโt pretend to justify it.
Holy Heckโฆ ^^THAT^^ is the single biggest misunderstanding of my entire appsheet list career!
Like, Iโm blown away
Yeah, took me awhile to digest it when I discovered itโฆ
I tried wrapping my ANY in a LIST() it didnโt workโฆ
Youโll need to use SPLIT(), not LIST():
SPLIT(ANY(USERPERM_CURRENT[userperm_ANY_tags]), " , ")
If USERPERM_CURRENT will only ever have one row, you donโt need ANY():
SPLIT(USERPERM_CURRENT[userperm_ANY_tags], " , ")
I think itโs starting to sink inโฆ LoL. At least itโs working now. How long have we been talking about lists together, 2 years now?
Yepโฆ
Update,
@Steve and @Aleksi you both came to the same conclusionโฆ That I donโt understand lists yetโฆ BAHAhAhAA when I included the [_THSIROW] I did NOT get any results. (I think maybe cause itโs a security filter??)
I also needed to change my USERPERM tags to " , " vs ", "
Still looking into another issue, but thank you both for helping me get this handled.
User | Count |
---|---|
35 | |
34 | |
26 | |
23 | |
18 |