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?
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.
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |