cancel
Showing results for 
Search instead for 
Did you mean: 

Executing BLS Transaction through Xacute query template?

former_member209705
Participant
0 Kudos

Hi Experts,

Am having a SQL query template for which am passing value from web page after user input and i have added this SQL in my BLS transaction in illumSQL action block. I have created Xacute query template and display template(iGrid) for displaying output from transaction.

Problem am facing is that am not able to execute my transaction after passing values to SQL query. How to get this working?

Regards,

Ravi Shankar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Did u use iCommand for this case?

document.<Applet>.executeCommand(); which will execute the BLS thru Xacute Query.

Of course, before trying this u should refer the help documents where everything is available to get understanding.

former_member209705
Participant
0 Kudos

Hi Som Sarkar,

Am using iGrid as my display template, that gets data from my BLS transaction after execution.

How to execute that transaction?

jcgood25
Active Contributor
0 Kudos

document.APPLETNAME.updateGrid(true);

Former Member
0 Kudos

in the web page, u hv an applet which has that iGrid display template as well as XacuteQuery which gets the data from BLS by executing.

For example,

<APPLET NAME="MyApplet" WIDTH="200" HEIGHT="19" CODE="iGrid" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="<YourQueryTemplateLocationPath>">

<PARAM NAME="DisplayTemplate" VALUE="<YourDisplayTemplateLocationPath>">

<PARAM NAME="InitialUpdate" VALUE="false">

</APPLET>

Now to execute that, u should hv this javascript code as follows

document.MyApplet.getQueryObject().setParam(1. <YourInputParameter>);

document.MyApplet.updateGrid(true);

former_member209705
Participant
0 Kudos

Hi som sarkar and jeremy thanks for your replies,

Solution works good in normal situation, in my case am passing values to SQL query template and then i want to updte the grid...even following the flow am not able to get the result from transaction.

i think sql query template accepts parameters, or is there anything i should know while passing values.

Regards

Ravi shankar

Former Member
0 Kudos

well, forget passing values from webpage.

first test ur BLS by passing the values with Transaction Properties and execute (Hit F6) to check the expected result. (Use Tracer Action to check the result)

If this is fine, then Test the XacuteQuery of the same BLS from Query Template Editor with parameters assigned in the Input Parameters

If this is fine, then check our suggestions as per given in previous posts

former_member209705
Participant
0 Kudos

Hi som sarkar,

Let me explain my problem this way, let say am having SQL Fixed query and am doing some field selection based on the parameter which is been passed to the query template.

-Checked the query template returning values, working good.

created one Display template to display whatever been fetched by query template(iGrid).

-Generated applet working good.

Now if i pass the parameters from webpage to SQL query(parametes are mapped in query template) and update the grid, it should work right but its not...

Thats what i was trying to ask you so far.

Regards,

Ravi Shankar

Former Member
0 Kudos

Can u pls copy paste here ur code for trying to show/update the Grid along with the Applet Tags where ur QT & DT are used.

former_member209705
Participant
0 Kudos

APPLET NAME="WorkCenter1" CODEBASE="/Illuminator/Classes" CODE="iGrid" ARCHIVE="illum8.zip" MAYSCRIPT style="width: 88px; height: 43px;">

<PARAM NAME="QueryTemplate" VALUE="Demo/QueryTemplates/Work_Center1">

<PARAM NAME="DisplayTemplate" VALUE="Demo/DisplayTemplates/WorkCenter1_Display">

</APPLET>

document.WorkCenter1.getQueryObject.setParam(1, order);

document.WorkCenter1.updateGrid(true);

where am getting the order number from user.

Regards

Ravi shankar.

Former Member
0 Kudos

See u missed the brackets () after getQueryObject thats this should b as follows

document.WorkCenter1.getQueryObject<b>()</b>.setParam(1, order);

document.WorkCenter1.updateGrid(true);

former_member209705
Participant
0 Kudos

Hi som sarkar,

yes brackets are missing, i think it works well with other applets with the same syntax, now i have added brackets. Eventhough am getting only blank grid. Any suggestions.

Regards

Ravi Shankar.

Former Member
0 Kudos

Dont assume that fault syntax will run in some cases and will not run in some other some cases. Always use same proper syntax in all cases.

In the applet tags, did u hv set the InitialUpdate as False as follows

APPLET NAME="WorkCenter1" CODEBASE="/Illuminator/Classes" CODE="iGrid" ARCHIVE="illum8.zip" MAYSCRIPT style="width: 88px; height: 43px;">

<PARAM NAME="QueryTemplate" VALUE="Demo/QueryTemplates/Work_Center1">

<PARAM NAME="DisplayTemplate" VALUE="Demo/DisplayTemplates/WorkCenter1_Display">

<b><PARAM NAME="InitialUpdate" VALUE="false"></b>

</APPLET>

One thing, wat do u hv the xml when Right-Click on the Grid Applet > Show Data Details? No Data Available? or wat?

former_member209705
Participant
0 Kudos

Hi som sarkar,

I finally got what is going wrong, it is with fixed query. While filtering the query fetch i have given something like orderno = '[Param.1]', this gives result when you test it from query template. But its not accepting any values. So i just tried giving parameter like this orderno = [Param.1] (without single quotes). And its working, i dont know thats the right way of doing it. But that was the problem.

Regards

Ravi shankar

Former Member
0 Kudos

Hi,

check the data type of orderno column....

for varchar single quote will work

for int and float you have to give with out single quote

If you have time please check the following steps

1. Create the query template

2. call this query template into transaction. Create the transaction properties for parameters and an xml output.

3. link the parameters in the illumSQL query action block.

For example transaction.OrderNo = illumSQLQuery_0.Param.1

asign the results to the xml output

4. call this transaction in xacute query template

5. in the input param tab assign the transaction property as the param.1

Now set the param through java script and update the grid.

Regards,

Kishore