Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Filter using Logged In User

Accepted Solution Solved
Reply
Contributor
Posts: 71
Accepted Solution

Filter using Logged In User

Hi Community,

 

I got a requirement wherein the data for a "BarChart" should be filtered based on the "Logged In User". How can  I implement this in SAS Report Designer.

 

Kind Regards,

Balraj


Accepted Solutions
Solution
‎04-18-2016 04:03 AM
Super User
Posts: 981

Re: Filter using Logged In User


All Replies
Solution
‎04-18-2016 04:03 AM
Super User
Posts: 981

Re: Filter using Logged In User

Hi,

 

I wonder if what you are looking for is the “Row level security” in SAS Visual Analytics.

 

http://support.sas.com/resources/papers/proceedings15/SAS1779-2015.pdf

http://support.sas.com/documentation/cdl/en/vaug/65747/HTML/default/viewer.htm#n1reswjzgl7gjyn1iio6m...

 

 Best regards,

Juan

Super User
Posts: 1,208

Re: Filter using Logged In User

Hi Balraj,

 

It seems that to fulfill your requirement you may need to do row level security. Have a look at this search criteria on row level security to see if these threads help answer your question. If not, please elaborate further on what it is that you are trying to achieve with the filter. What is being filtered and is it for every user etc.

 

Kind Regards,

Michelle

 

Contributor
Posts: 71

Re: Filter using Logged In User

[ Edited ]

Hi @MichelleHomes and @JuanS_OCS

 

I got an output table from Databuilder with data for all the users. When the user logs in he should be able to see the data related to his own region/country. I've implemented row level security as suggested by @JuanS_OCS its working but I need to use the Logged in user to filter the data either to the Report Object such as bar,table,crosstab or to the Output table.

I'm following this link for passing the username but unable to get the expected result.

i.e. Identity-Driven Properties

 

http://support.sas.com/documentation/cdl/en/bisecag/67045/HTML/default/viewer.htm#n0m3ptctbmjpzkn1wo...

 

If you can guide me on how i can use Identity-Driven Properties either in Report Designer/DataBuilder that will be great. Smiley Happy

 

Kind Regards,

Balraj

Occasional Contributor
Posts: 10

Re: Filter using Logged In User

Hi @JuanS_OCS, @MichelleHomes and @balraj,

Even I am trying to use logged in user name to filter out data the way @balraj was trying. If it's required to use batch tools to apply Identity driven filtering, can you please put some light on how to use it in batch tools? Can we do it without using batch tools? I mean, in data builder or at report designer level ? Will appreciate the reply.

Super User
Posts: 1,208

Re: Filter using Logged In User

Hi @nattargekar,

 

If you are looking for a point and click way to do this, the blog I wrote, Conditional Grants in SAS Visual Analytics may help. You need to use SAS Visual Analytics Administrator for this technique. There isn't a way to do set up row-level security within SAS Visual Analytics Designer.

 

Kind Regards,

Michelle

Occasional Contributor
Posts: 10

Re: Filter using Logged In User

Hi @MichelleHomes, Thank you very much for your reply. Yes I have gone through the blog you wrote on metacoda. It was helpful.

I was also wondering to use  -condition "empID='SUB:Smiley FrustratedAS.Userid'"  to find out the logged in user and apply identity specific filtering. I don't know where to use it. I tried it in query designer and report designer expressions but I doubt It is not the correct place to use it. Can you give an example of it and how to use it (I think in command prompt with batch tools, am I right ?). I am new to SAS VA. Your valueable reply will be very helpful. Thank You.

Super User
Posts: 1,208

Re: Filter using Logged In User

Hi @nattargekar,

Your assumption in using the batch tools is correct. You may want to look at this thread that outlines it well. https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-IdentityGroups-in-Conditional-Grants/m-p/196...

Kind Regards,
Michelle

Contributor
Posts: 71

Re: Filter using Logged In User

[ Edited ]

Hi @MichelleHomes , @JuanS_OCS Thanks alot for you guidance

 

I've Successfully implemented it, summing up all the steps:

1. Goto "C:\Program Files\SASHome\SASPlatformObjectFramework\9.4\tools"

2. Open the command prompt and navigate to the above path

3. Enter the below statement, here object-path refers to the path to LASR TABLE. If it is a Table Object append the path with (Table) else not required.

sas-set-metadata-access -host <hostname> -port < portno> -user <username>-password <password>    
"< object-path>" -grant "<group>":Read,ReadMetadata -condition "(<colname>) IN ('SUB::SAS.IdentityName')"

4. Refer below URL's for reference.

 

Batch Tools for Metadata Authorization

Batch tool sas-set-metadata-access

Identity-Driven Properties

 

Super User
Posts: 1,208

Re: Filter using Logged In User

Hi @balraj,

 

Glad to hear you have it working and thanks for sharing the steps for your implementation that may help others in future.

 

Kind Regards,

Michelle

Contributor
Posts: 32

Re: Filter using Logged In User

Hi ,

 

Is this possible in Stored process, I want to add same functionality in Stored Process.

If user sademo logged in the filter  should be come for sasdemo only. Is this possible ?

Post a Question
Discussion Stats
  • 10 replies
  • 798 views
  • 3 likes
  • 5 in conversation