Filter View by useremail

Hello all, I’m working on a dispatch application.

I’m looking to filter my view so that my drivers will be able to see only their deliveries, though I’d also like my admins to be able to see all deliveries available.

For example, I have a column in my employee list that labels a specific user as ‘Admin’, but I can’t seem to make my admins an exception from the USEREMAIL() function.

How might I proceed with this issue?

Thank you for your time and consideration!

2 Likes

Okay yes, I can see how that may work, but how would I get appsheet to determine that the current user is designated as an admin?

And if either statement in an OR function comes up true, how would that filter my list for our drivers?

Something like:

OR(
  ([Driver] = USEREMAIL()),
  ("Admin" = LOOKUP(USEREMAIL(), "Users", "Email", "Role"))
)

See also:

1 Like

I have a slice with this function USEREMAIL()=LOOKUP([Company], Tblfacility,Facility,HR)
So the signed in user if is the hr person for the company of the row will see the data.
But when I put it in a view show function it doesn’t recognize the column name. I want to use it in a view because when i use it in the slice my report over that slice does not work.

The doc likely answers your question. Read all of it.