How to hide a record from particular users

I have a “Projects” table of which I wish to hide certain projects (meaning certain rows) from certain users (multiple combination of users, like choosing from an enumlist).

I have faint ideas on how to achieve that. Like making a column named “Hide from”, and incorporate a ‘select’ function pointing to the list of users, and making a slice to filter out the row names based on the users that are selected.

But I do need some help in setting things right.

Hi @Pratyay_Rakshit

It sounds that you wish to hide / show at record level rather than column level

Did you get a chance to go through the following article?

1 Like

Actually I have been able to do what I wanted in the meantime.

I incorporated a column in the main Projects table, named [Hide From] with a valid if expression using a select function that points to the useremail column in the ‘user records’ table and lets me select the ones that I want.

Then I created a slice from the “Projects” table with a filter like this:

IN( useremail(), [Hide From]) = FALSE

That filters out the users from seeing the particular row.

Now the concerns that I have regarding this:
My own useremail() comes in the list along with the others’. It may be a good idea to be able to hide that.

It would be good to be able to select the users based on their names rather than the emails (only when those comes in the list).

I suppose both of these shouldn’t be mandatory for flawless running.

EDIT: I’ve just encountered a major flaw. The project is still showing up in the dropdown list in contingent forms where it is required to have a record of the project name. How do I correct this?

RE-EDIT: Stupid of me again, the reference table would have to be the slice itself that I corrected.

Pardon for putting up a question and finding a solution myself, but this could be of help to potential solution seekers of similar problems.

3 Likes

Hi @Pratyay_Rakshit,

Good to know that you got it working the way you want. Great.

Could you elaborate?

It would be good to be able to select the users based on their names rather than the emails (only when those comes in the list).

You could have a User name listed against each email in your user’s table and use some sort of lookup could be bult ? Implementation, I have not not tested though…

It souds that your are using slice based filtering to show the data to various users. I presume you are aware of difference between slice based filtering and security filters in terms of users’ data reaching the device.

It souds that your are using slice based filtering to show the data to various users. I presume you are aware of difference between slice based filtering and security filters in terms of users’ data reaching the device.

Not really. Its because maybe I haven’t yet run into problems that could be arising from that context.

I request you to read below, especially section under “2. Can slices be used instead of a security filter?”

And following post please

4 Likes