Page 1 of 1

Universal Display and *LIBL

Posted: Fri Aug 02, 2019 11:50 am
by dougmatthews47
Hello,

I am having trouble calling a Univ. Displ. file and getting the libray list correct.
the url I am using...

http://iseries:8080/profoundui/auth/uni ... parm3=val3

I have had to use qcmdexc to add libraries for the files I want, including LIBHTTP. Even though the user ID I am logged into Atrium with has the libraries in the JOBDESC.
The program (rmrte) that puiwrkmap is mapped to runs just fine when called from a green screen logged in with the same userID.

Can you tell me what I am doing wrong?

Re: Universal Display and *LIBL

Posted: Fri Aug 02, 2019 12:02 pm
by Scott Klement
Hi Doug,

How are you calling the Universal Display?

If you call it via the url property of one of the database-driven widgets, it should be automatically synchronizing the library list with the Rich Display or Genie session that called it.

If you're calling it via AJAX from a Rich Display or Genie session, you would need to manually add the AUTH parameter. If you do that, then just as above, it will synchronize the library list with the calling session.

If you're not calling from Rich Display or Genie, then you'll have to devise your own way of setting the library list (The Universal Display won't do it for you in this case). Using QCMDEXC would work. A more commonplace approach would be to point the map (i.e. the fields you set in PUIWRKMAP) to point to a CL program. The CL program sets the library list and then just does a CALL to the RPG program that has the Universal display.

Re: Universal Display and *LIBL

Posted: Fri Aug 02, 2019 12:08 pm
by dougmatthews47
Can you show me the correct syntax for the AUTH parm?

Re: Universal Display and *LIBL

Posted: Fri Aug 02, 2019 3:06 pm
by Scott Klement
I'd be glad to give you an example, but you'll have to give me more context. Are you running this in a Rich Display or Genie, or...? Are you calling this via one of Profound's AJAX APIs? Or is it your own? Or, how are you calling this?

Re: Universal Display and *LIBL

Posted: Fri Aug 02, 2019 3:42 pm
by dougmatthews47
I am calling from Genie - window.open(url,'_blank');

Re: Universal Display and *LIBL

Posted: Fri Aug 02, 2019 4:02 pm
by Scott Klement
Something like this:

Code: Select all

var url = "http://iseries:8080/profoundui/auth/universal/rmrte?parm1=val1&parm2=val2&parm3=val3&AUTH=" + encodeURIComponent(pui.appJob.auth);

Re: Universal Display and *LIBL

Posted: Mon Aug 05, 2019 8:47 am
by dougmatthews47
Thanks

Re: Universal Display and *LIBL

Posted: Mon Aug 05, 2019 8:50 am
by Scott Klement
The name is AUTH, the value is the value of the pui.appJob.auth JavaScript variable in the Profound UI session that is starting the request. See the example I provided, above.