Is there a way to pass the logged in user into a visualization as a filter. If I have a sales report that a management level employee is viewing its fine to have a filter in the visualization to select the sales person they want to see. For individual sales people though I would like to pass their login credentials in as a filter on a duplicate of that same management report.
Up to version 6.2 its not possible to use the users id directly to filter the LARS data, but there is another solution.
You can make usergroups that refer to a certain way of filtering data. (Read_LASR_george)
Link the user George to this group as a member. (You can do this directly by user, but I prefer usergroups)
If you mark the data table in the "manage environment" and right click you can set the authorization.
Here you can use the "conditional grand" Read method for read access to the data.
Here you can define the way you want the data to be sorted for George. (Empl_nr=1111 or something like Sales_rep='George')
I also use this method successfully in my sales reports. (Management sees all data, Sales rep only sees his own customers)
Hope this might help in the new year...
Greetings Peter
Do you have access to the SAS automatic macro variable?
SYSUSERID
Not in VA that I can figure out. I can accomplish this using code and a stored process in SAS, but it doesn't look like they have this in VA.
Up to version 6.2 its not possible to use the users id directly to filter the LARS data, but there is another solution.
You can make usergroups that refer to a certain way of filtering data. (Read_LASR_george)
Link the user George to this group as a member. (You can do this directly by user, but I prefer usergroups)
If you mark the data table in the "manage environment" and right click you can set the authorization.
Here you can use the "conditional grand" Read method for read access to the data.
Here you can define the way you want the data to be sorted for George. (Empl_nr=1111 or something like Sales_rep='George')
I also use this method successfully in my sales reports. (Management sees all data, Sales rep only sees his own customers)
Hope this might help in the new year...
Greetings Peter
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.