cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Transaction to IlluminatorTag

sidnooradarsh
Contributor
0 Kudos

Hi All,

I am trying to set the Tagname in links of illuminatorTag through a transaction variable which i sent from a javascript function.But when i set it in the links its not showing the output for the tagname i set.Please anybody help me out with this

How to set the Tagname in links in illuminatorTag block.

Adarsh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Are you mentioning about IllumTagQuery Action block? If yes, read the following:

1. Create Transaction properties to get the values from java script.

2. Link those transaction properties with Tagname.1 and etc. then you will get the desired result.

For example.

1. Create a tag query without specifying any tags. The mode is history or history event or current.

2. Create a new transaction and name the transaction properties as tagname1, tagname2. In the value, mention the values such as CylTemp1, CylTemp2.

3. Link the transaction values with the Tagname.1 and Tagname.2.

4. Add a xml saver to save the result of the query.

Hope this helps you.

Regards,

Kishore kumar P.S.

sidnooradarsh
Contributor
0 Kudos

Ya, I have done in the same way.

I have created a transcation variable called machine which holds the Tagname passed from javascript function then I linked the transaction value of machine to TagName.1 under links of IllumTagQuery action block .but its not producing the result. If i

jcgood25
Active Contributor
0 Kudos

Adarsh,

If you are trying to pass tagnames with JavaScript into the transaction through an XacuteQuery then you will need to associate the Transaction Input properties to the desired Param.x values in the query template. Then when document.APPLETNAME.getQueryObject().setParam(1,"ABC"); is called the string value for the desired tagname will go into the XacuteQuery which binds the parameter to the input property of the transaction. If would appear that you have the linking done properly within your actual transaction based upon your description.

Regards,

Jeremy Good

sidnooradarsh
Contributor
0 Kudos

Jeremy,

I have done exactly the same way as you told and i am not facing any problem in binding parameter to input property of transaction. but i don't know how to configure the illuminatorTag Action Block and link the transaction variable to TagName.1 in links. And if i don't set any tagname in configureTab of illuminatorTag Action Block then it sends an error message saying

<b>" There was an error generating Sample XML Error Message: No Tags requested"</b>

so please tell me how to link the transaction variable to TagName.1 in links in IlluminatorTag Action block. without hard coding the Tagname.

Thank you,

Adarsh

jcgood25
Active Contributor
0 Kudos

Since you are always going to overwrite the tagnames going into the TagQuery action block, add one to your query template and then reconfigure the action block. When a tagname is in the query template and you press OK to generate the sample results you should be able to link your transaction property to TagName.1 in the link editor.

Regards,

Jeremy

sidnooradarsh
Contributor
0 Kudos

I added a Tag called "Mach1" in Tag query and then clicked ok then it generated the Sample XML without any error and then i declared a transaction variable called "Machine" with String datatype and i linked it to the TagName.1 param in links of IlluminatorTag Action Block. Then i passed Tag called "Mach2" from Xacute query and hit the "Test" button then it returned me Zero Value. But when i passed again Tagname "Mach1" and hit Test button it returned me with correct results.

so i am not getting where its going wrong please help me out with this.

Thanks,

Adarsh

jcgood25
Active Contributor
0 Kudos

Adarsh,

It sounds like you are missing something quite basic, please confirm the following:

XacuteQuery template: Param.1 mapped/bound to TRX input called Machine

Transaction Properties - String input called Machine, XML output called OutputXML (don't forget the checkbox)

TagQuery action block with valid query template (valid DataServer and a Mode like Current, History, etc.) configured and one Incoming link that assigns the value of Transaction.Machine to the TagQuery's TagName.1

Assignment action block that assigns the xml results from the TagQuery action block to the Transaction.OutputXML (so the Xacute query template receives the results of the tag query).

Regards,

Jeremy Good

sidnooradarsh
Contributor
0 Kudos

Jeremy,

Thanks Jeremy my issue has been resolved.

Regards,

Adarsh

sidnooradarsh
Contributor
0 Kudos

Hi,

I am passing the TagNames through transaction variable to IlluminatorTag query and i am getting the results for the Tagname i passed. But in the Repeator and in the Assignment action blocks the data related to passed tagname doesn't come it still holds the default Tagname value which is set in the QueryTemplate.

Regards,

Adarsh S P

Former Member
0 Kudos

Hi Adarsh,

>> I am passing the TagNames through transaction variable to IlluminatorTag query and i am getting the results for the Tagname i passed.

However as you descriped above you do this dynamically from a webpage. And it works.

>> But in the Repeator and in the Assignment action blocks the data related to

>> passed tagname doesn't come it still holds the default Tagname value which is

>> set in the QueryTemplate.

This is the way it is used to be. I'm guessing you use your original TagQuery you created in the Template Editor => Your Example XML will have the Tagnames you used there. => The Repeater will use this Tagname.

The Business Logic Editor is more a statice Development Environment where you use example XML to get your Links in the Link Editor done. During runtime everything will be replaced like you prepared it.

If you want to refer to the right Node of your Repeater in an AddRow-Action Block or in an Assignment for example you can use the following XPath expression:

Repeater.Output{/Row/*[2]}

where 2 = the second Node of your Repeater.Output.

Hope this helps.

Ciao

Martin

Answers (0)