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 |
---|---|
39 | |
28 | |
24 | |
24 | |
13 |