cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a value for a global variable

Former Member
0 Kudos

It seems we can not change the value of a global variable using the Assignment action. In Configure Links I can not acess the variable I had created (just for reading). Is it right? I would like to access an information in all my transactions but it change dynamically. How can I do that (but using a table in the database!)?

Nuno Cunha

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I have decided to keep this in my database instead of as a application variable.

sidnooradarsh
Contributor
0 Kudos

Hi Nuno,

You cannot change the value of Global transaction variables via Assignment block or by any other action block in BLS at runtime but refer to these thread which tells about some alternatives or workaround

[Thread1|]

[Thread2|]

Hope this helps!!

Regards,

Adarsh

Former Member
0 Kudos

Could you provide more details? The question is not clear.

Chanti.

Former Member
0 Kudos

Hi,

I have created an global variable named "mod" with value "M". Some transactions of my project need use this information. At some time I need change this value to "A", So I was creating a new transtaction to change this variable. Using Configure Links of an Assignment action I can not give values to my global variable. I can use it but can' t change it.

So my questions are: if is it right and how can I change it or how can I have an information that all transactions can use and I can change its value.

Nuno Cunha

Former Member
0 Kudos

I am not sure about making changes to global variables at run time in transactions. But, looking at your scenario, I think it makes more sense to focus on the logic when you need "M" vs. "A" (if those are the only 2 values allowed). Create two seperate global variables for "M" and "A" and use them in your transaction(s) using conditional statements according to your defined logic.

Chanti.

Former Member
0 Kudos

Hi,

The value of this variable reflects an external signal. So if "A" I have one behaviour... if "M" another behaviour.

In my case I have "A" is for "Automatic" and "M" is for "Manual", so if some one (the user using my RIA system) changes from "A" to "M" or from "M" to "A" all my MII Transactions has to do different things while in "A" or in "M".

Global variables seems to be what I need, but if I can not change its values I do not use them. I am afraid I have to use the database to keep this state and at all transaction get this value and use to decide which branch (Conditional) to go.

Nuno

sidnooradarsh
Contributor
0 Kudos

Hi Nuno,

As I have provided link for the threads in previous post, you can make use of CurrentWrite option to write a value to tag and then retrieve the same using current mode.

If some is changing from M to A or visa versa would be nothing but writing a value to tag and then within transaction you can retrieve it back through tag query using current mode.

Hope this helps!!

Regards,

Adarsh

Former Member
0 Kudos

Hi Adarsh,

I am out of my office for a while (Christmas vacation) but as soon as posible I will take a look. Thank you very much for your comments.

Merry christmas,

Nuno Cunha