Security view expression

Hey guys!

Ok so I am trying to put together an expression that says these employees on this crew can view a view on the app. I want people both on the admin crew and the maintenance crew to be able to view it.

I have a spreadsheet called Employees. The key is the employee name, but then the other columns are [Useremail], [Crew], etc.

I have other functions on the app that utilize the Employee Name as a ref so I need to keep that as the key. Can’t change the key to Useremail.

So what expression do I use? FILTER? SELECT? Nothing seems to be working. Is it a row ref? Idk. I’m thinking something like this, but I know it’s not quite there…

OR((Useremail() = [Useremail].([Crew]= “Maintenance”), (Useremail() = [Useremail].([Crew]= “Admin”)

What are your thoughts? Remember, Useremail is not the key in the spreadsheet. I feel like I should use a de-ref somewhere but maybe that’s not quite right.

Solved Solved
0 8 194
1 ACCEPTED SOLUTION

Try this as the view’s Show if expression:

ISNOTBLANK(
  FILTER(
    "Employees",
    AND(
      (USEREMAIL() = [Useremail]),
      IN([Crew], {"Admin", "Maintenance"})
    )
  )
)

View solution in original post

8 REPLIES 8

Steve
Platinum 4
Platinum 4

For a security filter or slice? Or a column Show? expression? Or a view’s Show if setting?

It’s the security filter for a View

Okay, before going too far here, it’s super important to understand that Show if for a view is NOT a security feature. Show if merely determines whether the view is displayed in the main menu or along the navigation bar at the bottom of the screen. There are still ways for the user to get to the view, and if they get there, they will be able to see its content. Is that what you want?

Umm, I guess not, but I’m not sure if they would ever get there anyway.

Right now, I’m not really concerned whether they see things or not…it’s more of a convenience thing than anything else. I just don’t want to clog their phones with a million views if we don’t need to, but it’s not a crisis if they do see the information.

So, can you help me with the expression?

Try this as the view’s Show if expression:

ISNOTBLANK(
  FILTER(
    "Employees",
    AND(
      (USEREMAIL() = [Useremail]),
      IN([Crew], {"Admin", "Maintenance"})
    )
  )
)

Yay Steve! Thank you so much! It worked

Sorry didn’t rope you into the last one…

View>Display>Show If

Top Labels in this Space