Gridviews per User

LabKey Support Forum
Gridviews per User marcia hon  2018-07-03 12:17
Status: Closed
 

Hello,

I have a big table.

Now, I wish to filter it so that only user_x would be able to view the table filtered on x and nothing else.

For example, I have a table :

Name Department Date
Marcia English Nov 21, 2018
Bobby French Aug 12, 2017
John Portuguese Oct 30, 2016

So, I want Marcia to only see data filtered on "English". With Bobby, "French" and with John "Portuguese".

Is this possible and how do you do this?

Thanks,
Marcia

 
 
Jon (LabKey DevOps) responded:  2018-07-11 13:25
Hi Marcia,

It sounds like you're asking if you can create a filter that would be based on the individual user who is looking at the grid.

There is a special filter called ~me~ that assumes the user who is looking at the grid is the value desired.

From our docs: https://www.labkey.org/Documentation/wiki-page.view?name=filteringData#variable

"Using filter value variables can help you use context-sensitive information in a filter. For example, use the variable "~me~" (including the tildes) on columns showing user names from the core.Users table to filter based on the current logged in user."

So if you have a Name column that has the names of the users who are in LabKey, you can use that ~me~ filter to force the grid to only show the specific user rows that are tied to them and them only.

Regards,

Jon