Only allow User to see data of other users that have the department as him/her

Hi Everyone,

I have a small bug on one of my expression. basically here is what I'm trying to achieve :

I create a slice from a table and I want the signin user to only see the informations of the other users that have the same department name as him in the department column. all the usermail a sored in a column in the table called workemail .Here is the expression I wrote:

[department]=SELECT([department], [workemail] = USEREMAIL())

Hope someone can help.

Thanks in advance.

 

Solved Solved
0 5 223
1 ACCEPTED SOLUTION

Is your slice for the "table_employees" table?

Have you considered using the Current User (Slice) technique?

View solution in original post

5 REPLIES 5

Your issue may be that [department] is a text value while SELECT returns a list of values. Try either using IN instead of equals or else wrapping your SELECT function within an ANY or INDEX function.

Hi and Thanks for your feedback

I have follow your previous advise and do this:

IN([department],SELECT(table_employees[department], [workemail] = USEREMAIL()))

But still not doing what I want to achieve. I may be doing something wrong.

Again Thanks...

Is your slice for the "table_employees" table?

Have you considered using the Current User (Slice) technique?

Hi,

I've implemented your previous solution but end up not achieving what I expected. again maybe I'm doing it the wrong way but anyway thanks a lot. It helped me learn new ways of doing things with appsheet. Don't exitate if you have another suggestion. I'm open to that.

Again Thanks....

Steve
Platinum 4
Platinum 4

@SignXi2 wrote:

[department]=SELECT([department], [workemail] = USEREMAIL())


This expression is all wrong. You should spend some time learning how to use SELECT() properly.

Top Labels in this Space