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

SAS VA Logged user

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

SAS VA Logged user

Hello

 

I would like to add in the report a text box with the date of now and logged user.

The problem is the looged user, what can I use for that?

A parameter with a variable in the "current value" = the system variable for current user

Or the variable straight into the text box?

 

In the following images you can see how I what it to look in the report:

 

Hope you can help me with this Smiley Happy thank you!

 

 Data: 9/2/2018 UUser: &SAS.Userid or &SYSUSERID


Accepted Solutions
Solution
‎02-12-2018 09:38 AM
PROC Star
Posts: 404

Re: SAS VA Logged user

Hi!

One way could be to create a table with all your users, that can easily be done by reading the users from metadata %MDUEXTR;

Import the table to VA and create a row level condition where (userid = 'SUB:Smiley FrustratedAS.Userid')

Add the table to your report and if you are using 7.4 or 8.2 use a dynamic text to show the user, otherwise a table or listbox/list might work.

//Fredrik

View solution in original post


All Replies
Trusted Advisor
Posts: 1,852

Re: SAS VA Logged user

Hello @JoanSo,

 

I think you would need a Stored Process, who will be able to pick up the user id of the SAS session.

Then, the SAS Stored Process reserver variables will automatically contain the user id on several forms:

 

http://documentation.sas.com/?docsetId=stpug&docsetTarget=p184mqqbi9w6qjn1q0619x19eg02.htm&docsetVer...

 

METAPERSON
All
Specifies the person metadata name that is associated with the _METAUSER login variable. The value of this variable can be UNKNOWN. This variable cannot be modified by the client.
_METAUSER
All
Specifies the login user name that is used to connect to the metadata server. This variable cannot be modified by the client.

 

_username
Web Clients
Specifies the value for the user name that is obtained from web client authentication.

 

In some deployments this might be tricky if you have SSO or SAS Token Authentication. But try and one of them should give you the required result.

 

 

 

 

 

New Contributor
Posts: 3

Re: SAS VA Logged user

Posted in reply to JuanS_OCS

I looked for stored process and one of the obstacles is:

 

"You cannot add a stored process to a report if the precision layout view is selected. If the report already contains a stored process, then the stored process is removed if you change to precision layout."

 

I have all my dashboards with the precision layout.

 

Is there another way of doing this?

 

Thank you!

Solution
‎02-12-2018 09:38 AM
PROC Star
Posts: 404

Re: SAS VA Logged user

Hi!

One way could be to create a table with all your users, that can easily be done by reading the users from metadata %MDUEXTR;

Import the table to VA and create a row level condition where (userid = 'SUB:Smiley FrustratedAS.Userid')

Add the table to your report and if you are using 7.4 or 8.2 use a dynamic text to show the user, otherwise a table or listbox/list might work.

//Fredrik

New Contributor
Posts: 3

Re: SAS VA Logged user

Hey!

 

I did the step you sugested but the viewer only shows an "Alert" in the table that has de colum "userid".

I'm still looking for the reason..

 

Thank you for the idea Smiley Happy 

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 203 views
  • 3 likes
  • 3 in conversation