cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically setting a value in BLS

Former Member
0 Kudos

Is there a way I can programmically determine which variable that I am setting inside of BLS?

I tried puting the dynamic syntax into an Xpath target and got an error - Local.class_txt_#For_EachWord.CurrentItem#

I also tried using an xMII output rowset - DataItem, but the item only ever holds the original value set to it - why can't you write over the data that you put into an output rowset ITEM?

Is my best bet to settle for calling a sub-transaction 7 times to set my 7 variables or is there a way I can do calculate my locally used values (ex: Local.class_txt_1-7) within a for-next routine. I'm looking for speed and efficency here as this transaction is going to handle large blocks of data.

PS I'm using v11.5

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Sue,

The answer to you question is 'No'. We may expose this functionality in the future, but 11.5,12.0 and 12.1(when it comes out) will not have this type of feature. That said, we are aware that some customers would like this functionality.

Martin

agentry_src
Active Contributor
0 Kudos

Sue,

Thus speaketh the technical guru. So it will not happen anytime soon.

Martin,

Thanks for putting a stop to the speculation.

Mike

Former Member
0 Kudos

Hy Sue,

Knowing the list of returned tags that you can make a repeater in this list, for each passage of the TagName repeater attaches to a local variable and then capture the value in tagquery with the command line:

"TagEventHistoryQuery.Results (/ Rowsets / Rowset / Row / Local.TagName # #))".

I hope this message can help it.

greetings.

Former Member
0 Kudos

I have no problem dynamically reading the value, as you indicated in your post. My question is can you write a value into a dynamically determined variable?

agentry_src
Active Contributor
0 Kudos

Sue,

I do not believe you can at this time. I have tested many different xPath scripts and was not able to make it work. It is possible that in the future service releases or versions, it will be possible.

Perhaps one or more of the technical gurus will chime it. I would suspect that since we have not heard from them, it is not currently possible.

Thanks,

Mike

sufw
Active Participant
0 Kudos

Hi Sue,

I concur with Michael here; I've spent quite a bit of time trying to do this in 11.5 without success. Since you cannot nest dynamic links (the part enclosed in # characters), I don't think this is possible using the current MII environment.

A possible solution might be to use a 2-column MII XML document in the same way one would use dictionaries or hash tables; use the first column for the key and the second for the value. That way you have one structure (with one variable name) but are still able to dynamically 'name' your values...

Hope this helps,

Sascha

agentry_src
Active Contributor
0 Kudos

I don't know the answer, but I have tried a similar thing for mapping a variable number of parameters to a tag query and was never able to find the magic bullet for doing it. I will be watching to see if there is a solution.

Good luck!

Mike

sidnooradarsh
Contributor
0 Kudos

Hi mike,

If my understanding is right on the issue what you are facing is you are expecting the Tag name to hold the dynamically passed value.

And retrieve the tag reading for passed tagname not the values for default tag set in Tag query.

To get the tag data for Dynamically passed TagName.

Please do something like this:

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

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

This brings back the output for the dynamically passed TagName.

I hope this helps.

Regards,

Adarsh

agentry_src
Active Contributor
0 Kudos

Hi Adarsh,

Actually you are looking at the reverse of our issue. What we want to be able to do is build dynamically the property of a TagQuery to which we want to assign data.

In other words, we are not dynamically pointing to an existing property from the expression window in an action block linkage editor. We are trying to dynamically address the xPath linkage.

For example:

In a tag query you can select 100 or more tags. Suppose that you need to be able retrieve data from a minimum of 4 up to a possible 25 tags. In order to populate the tag query you need to address or point to TagName.1, TagName.2, ... TagName.N where N is between 4 and 25. Remember that this is in the xPath text window, not the expression window. Ideally you would be able to simply dynamically do something like this:

TagName.#Repeater_0.CurrentItem#

Then, in the expression window, assign the value of:

Repeater_0.Output{/Row/TagName}

But that does not seem to work. The last time I tried this was in 11.5, but I have talked to others who have tried it in 12.0. Maybe I do not have the syntax correct. I would welcome seeing the correct syntax and being able to do this. I don't have a current need, but have run into it in the past.

Thanks,

Mike