And(Or Expression

Looking for some help, Iโ€™ve seen a couple that are close on here, but have been unable to find the exact fix.

I am using a security filter on a set of survey forms.

What I want to show, is all surveys that have been completed within the past 7 days, along with a user list โ€˜adminโ€™ who can see all surveys by all users.

For the user/admin list I am using (which works well) a lookup table for all userโ€™s email for each Location:

or(useremail() = โ€œadmin1Test@test.comโ€,
useremail() = โ€œadmin2test@test.comโ€,
IN([Location], SELECT(FTE[Location], [Email] = USEREMAIL())))

Additionally, the filter for days works well. ([Time] >=now()-7)

Its probably super obvious, but how would I best combine these two to create a time filter for the 7 days, then apply the user filter as well?

Thanks for the help!

Solved Solved
0 2 146
1 ACCEPTED SOLUTION

You could please try

AND( OR(useremail() = โ€œadmin1Test@test.comโ€,
useremail() = โ€œadmin2test@test.comโ€,
IN([Location], SELECT(FTE[Location], [Email] = USEREMAIL()))), [Time] >=now()-7)

View solution in original post

2 REPLIES 2

You could please try

AND( OR(useremail() = โ€œadmin1Test@test.comโ€,
useremail() = โ€œadmin2test@test.comโ€,
IN([Location], SELECT(FTE[Location], [Email] = USEREMAIL()))), [Time] >=now()-7)

This worked perfectly, thank you!

Top Labels in this Space