Page 1 of 1

How to set variables by code-behind (JS)

Posted: Wed Dec 02, 2015 12:46 am
by hugo
Hello,

How to set variables by code-behind (JS).

I do this with my current FX version:

Code: Select all

for each (var variable:StiVariable in report.dictionary.variables)
{
	variable.valueObject = ....
}
How to do the same with JS ?

Re: How to set variables by code-behind (JS)

Posted: Wed Dec 02, 2015 10:49 am
by Vladimir
Hello Hugo,

Please try to use the following code:

Code: Select all

report.dictionary.variables.list.forEach(function(item, i, arr) {
    item.valueObject = ...
});
or

Code: Select all

for (var i = 0; i < report.dictionary.variables.list.length; i++) {
    report.dictionary.variables.list[i].valueObject = ...
}

Thank you.

Re: How to set variables by code-behind (JS)

Posted: Wed Dec 02, 2015 9:50 pm
by hugo
Thank you.

Re: How to set variables by code-behind (JS)

Posted: Thu Dec 03, 2015 7:19 am
by HighAley
Hello.

We are always glad to help you.

Thank you.