Show If As Security Filter Idea

I had an idea to simplify views columns etc being filtered.  Before I go down the road of setting it up I would like to know if I am wasting my time so any insight on flaws or "Cant do thats" are appreciated.  I think this will help computational load too.

I have started with something along these lines -

OR(Contains(Any(select(Usr_Access[Security Level], Useremail()=[useremail])), "Project Manager"),Contains(Any(select(Usr_Access[Security Level], Useremail()=[useremail])), "Administrator"))

But I was thinking instead to simplify it as each user will need acces to multiple groups of things that if I created a virtual column that contains the value of the users access levels from my usr table, to use a show if "Contains([Virtual Column], "Project Manager").  My only concern is for views, does the VC calculate with regard to a specific view, like a project manager dashboard?  Or will it only be relevant for the show ifs directly in regard to data, ie. column shof ifs or row security filters?

 

Thanks appreciate any input!

0 2 56
2 REPLIES 2

Being fully honest... I *think* I understand parts of your question, but apologies if I missed the point.

On the virtual column
I don't follow your plans for the virtual column, but its access shouldn't be limited by a view

Simplifying the formula
1) Not required, but one thing I tend to do is to make a "Current User" slice off the user list using the [email column]=USEREMAIL() formula.   That way you don't have to put that filter criteria in each time you want to look up data on that current user row.

2) Assuming Im understanding correctly that you are trying to match up 2 lists (a list of security roles for the user, and a list of security roles that should have access to something), you could do that a little cleaner using the INTERSECT() list function.  If the count of intersections is greater than 0, then return true to your ShowIF statement.  Something like:

COUNT(INTERSECT(ANY(SELECT(Current_User_Slice[Security Level],TRUE), LIST("Project Manager, "Administrator","etc"))>0

Hope that helps some.

Thank You Anneville,

I Like the Current User Slice idea, and reading your post I think I may have found a way to simplify it as well.  Instead of a list in a security filter column, spread the 4 or 5 to yes/no columns and just have it check for true in 1 or 2 or 3 different.

Combined with your current user slice I think it count be as simple as CurrentUser[PM]=True, or an OR statement is multiple roles should see it, OR(CurrentUser[PM], CurrentUser[Technician]) etc.  It works in my head anyways I will try it, thanks again for your input!

Top Labels in this Space