cancel
Showing results for 
Search instead for 
Did you mean: 

how to get query output in javascript

former_member211944
Active Participant
0 Kudos

i have a transaction with one output parameter.

i have created an xacute query and referenced the transaction and its output parameter.

now how do i get the value of that output parameter in a script in irpt file.

i tried creating an applet.

<APPLET NAME="executeApplet" CODEBASE="/XMII/Classes" CODE="iBrowser" ARCHIVE="illum8.zip" WIDTH="100" HEIGHT="100" MAYSCRIPT>

<PARAM NAME = "QueryTemplate" VALUE="RH_DASHBOARD/Execute">

</APPLET>

i tried with this code in the script

document.executeApplet.getQueryObject().getOutputParameter()

but this gave me the output parameter name not the value.

i just need the value of the output parameter in the java script.

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Kudos

Hi Rohit,

Try using getBrowserObject().getSelectedItemAt(1). Or you can use any of several other methods to get the value of your output. If you are in 12.1 or greater, go to the workbench and open your webpage. At the bottom of the window with the html and javascript, you will see an elipse of 5 dots. Click and hold to drag that line up. That will expose the script assistant when you can browse for the other methods available.

Regards,

Mike

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

If you are not looking to display this value, but just need to get it into javascript, then an iCommand applet would be a better option to use. Reference the help documentation for the executeCommand and getValue methods (there should also be examples in the docs or in searching the forum or wiki page).