Page 1 of 1

Passing Atrium username to RPG program

Posted: Wed May 16, 2018 9:09 am
by LoriAustin
I am new to RPG and Profound UI. We need to limit the data we show in a program based on a username - they should only see data they have entered. Is there a way I can get the username when the program is run from Atrium and pass it to my RPG program?

Re: Passing Atrium username to RPG program

Posted: Wed May 16, 2018 10:08 am
by Scott Klement
There are examples of retrieving the current user in the following docs pages
http://www.profoundlogic.com/docs/displ ... e+from+Job

Re: Passing Atrium username to RPG program

Posted: Wed May 16, 2018 10:50 am
by LoriAustin
Thanks, Scott.
We tried this and it works when I run the program by using Launch Session from the Profound UI development screen. But when I run the same program from Atrium I get a user QTMHHTP1. Is this because of something we have not set up correctly in Atrium?

Re: Passing Atrium username to RPG program

Posted: Wed May 16, 2018 11:56 am
by Scott Klement
Have you made sure you're using the proper positions of the PSDS shown in the link? Using the wrong positions can result in the wrong userid.

The other possibility is that you're launching the program as an anonymous program. Check the URL you've configured in the menu item that launches your program.

Re: Passing Atrium username to RPG program

Posted: Wed May 16, 2018 1:20 pm
by LoriAustin
Yes, it is being launched as an anonymous program.

Re: Passing Atrium username to RPG program

Posted: Wed May 16, 2018 1:50 pm
by Scott Klement
Ah, okay. QTMHHTP1 is the correct userid for an anonymous program, so all is working properly.

If you want the program to run as the user who signed into Atrium, simply launch it as a non-anonymous program.

Re: Passing Atrium username to RPG program

Posted: Thu May 17, 2018 7:58 am
by LoriAustin
Thank you.