cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting the input values in xacute query

Former Member
0 Likes
727

Hi friends,

I have webpage which should send production order number to the xacute query.

In the xacute query iam calling a BLT where i have defined a transcation property for this production order number of type input and defined tracer to check whether its getting any prodution number or not.

When am testing the xacute query i was not getting any production number which i was passing thru webpage.

Can anybody tell me how should i get the value from the webpage to the xacute query.

Please help me out.

Thanks in advance.

Regards

Sireesha.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Likes

In a situation similar to the one described by Sireesha, I'm trying to pass a number collected in a web form into an xacute query but the applet running the xacute query fires off before the form is filled in. How do I keep that from happening (or re-run the applet after I click the form's submit button)?

My HTML looks like this:

<script type="text/javascript">

function processForm() {

var x = document.FuncLoc.getQueryObject();

x.setParam(1,document.GetPlantNumber.PlntNumb.value);

}

</script>

</head>

<body>

<form name="GetPlantNumber">

<input type="text" name="PlntNumb">

<input type="button" name="Submit" value="Submit" onClick="processForm();">

</form>

<applet name="FuncLoc" width="1" height="1" code="iChart" codebase="/Illuminator/Classes" archive="illum8.zip" mayscript>

<param name="QueryTemplate" value="TestTemplates/funcloclistQ">

</applet>

Thanks for your help.

David

Former Member
0 Likes

David,

All applets support the InitialUpdate event. By default, this parameter is enabled. Open your iChart display template and under the Auto Refresh tab, uncheck the Initial Update checkbox. This will disable the applet from running until called upon. In your Javascript function, add the following line to:

document.FuncLoc.updateChart(false);

Also, change the button type from "Submit" to "button".

When the user clicks the button, it will fire off the processForm function, passing into the xacute query the correct Param.1 value and updating the iChart with the newly queried data.

Regards,

Michael Teti

Former Member
0 Likes

Thanks, Michael. Adding the document.FuncLoc.updateChart(false) to the function got the applet to re-run with the form-supplied parameter.

But I didn't have a display template in the applet so is there any other way to disable the applet from its initial run?

David

Former Member
0 Likes

David,

It is recommended that you define a display template.

If you would like to use xMII's default iChart template, use the following technique:

<param name="DisplayTemplate" value="Defaults/iChart">

Then call the Initial Update parameter from within the applet definition.

<param name="InitialUpdate" value="False">

Regards,

Michael Teti

Former Member
0 Likes

That took care of it! (though I did have to change the document.FuncLoc.updateChart(false) to document.FuncLoc.updateChart(true) to get it to run the applet.)

Thanks for your help, Michael.

David

sufw
Active Participant
0 Likes

David,

Calling updateChart(false) or updateGrid(false) (for iCharts and iGrids respectively) only causes the applets to be redrawn. Setting the function's parameter to true will cause the applet to re-run the query and then redraw itself.

Sascha

Former Member
0 Likes

There are a couple of "links" to check for.

-Make sure in your BLT that there is an input property.

-In the Xacute Query, make sure the Input properties are mapped to the Query parameters on the Input Params tab. (At this point, you can test the functionality by testing the Xacute Query.)

-On the web page, pass a parameter into the Xacute Query applet using Param.1. You can do this via javascript, a url property, session property, or a url call.

Former Member
0 Likes

Hi,

I hope you get the production order no from some applet.

Include one more param and call a funtion in that applet

For example:

<param name="CellSelectionEvent" value="Functionname">

Then add your Xacute query template in your webpage.

In the function, You call this query and set the param.

For example:

If you enter some value through forms in webpage

functionname()

{

var x = document.<xacute applet name>.getQueryObject();

x.setParam(1,document.forms[0].<value>);

}

If you get values from applet(applet name)

functionname()

{

var x = document.<xacute applet name>.getQueryObject();

x.setParam(1,document.<applet name>.getGridObject().getSelectedCellValue(columnno);

}

You can also directly call this transaction in your web page via URL and pass the parameter.

In this case thee is no need to create xacute query.

Hope this helps you.

Regards,

P.S.Kishore kumar

Former Member
0 Likes

Hi Sireesha,

I think one way of achieving this is to create another transaction with a xcaute query action in it.map the xacute query that you have created in the configure object.Create an input transaction parameter as production order number.In the configure links, you can map the production order number transaction oparameter to the xacute input parameter.Add an xml saver in the nest sequence and map the output of the xacute query to this xml saver object.Now you have to just run the transaction in the web page and test the xml.

Hope this helps,

Ram