Hey all! Having minor issues with the securi...

Hey all!

Having minor issues with the security filter for the views.

Using this expression:

OR((USERNAME() = email#1), (USERNAME() = email#2), (USERNAME() = email#3), etc)

And I have my own email in there, but for some reason Iโ€™m not seeing the view after I save and verify.

Any thoughts on why?

Basically, I want only people from the construction crew or maintenance crew (I have this listed in a separate place) to be able to view it.

But those expressions were being a pain and not showing what I needed, so I tried just straight-up listing username addresses.

But now Iโ€™m not sure this is working eitherโ€ฆ

Thoughts?

0 4 315
4 REPLIES 4

I donโ€™t think this is the problem, but you could greatly simplify your expression by writing it instead as in(useremail(), {email#1, email#2, email#3, โ€ฆ}).

Ah. Do you want username(), or useremail()? Iโ€™d think useremail().

@Steven_Coile useremail, although i do have a list of employees with their

useremails and the crew they are on.

I tried writing a lookup expression to say that, for example, I wanted everyone on the construction crew to see the view and not other people.

But the loookup only fetched one result.

I want it to show it to all the people on the list.

Should i use a lookup? Or something else?

@Miranda_Lubarsky In this case, you would probably want to use a select() rather than lookup(). But letโ€™s start with getting the expression you posted initially working. I suspect the reason this:

OR((USERNAME() = email#1), (USERNAME() = email#2), (USERNAME() = email#3), etc)

didnโ€™t work is because you used username() (user name) instead of useremail() (user email). Try changing that and see what happens.

Top Labels in this Space