Page 1 of 1

How to set a StringList variable by code?

Posted: Thu Apr 04, 2019 12:23 am
by Barnaby
Hey,

How do you set the value for the following variable?
StringListVariable.png
StringListVariable.png (10.98 KiB) Viewed 1890 times

I've tried a few things, but with no success. Eg

Code: Select all

report.dictionary.variables.getByName("Test").valueObject = "A";
report.dictionary.variables.getByName("Test").valueObject = ["A"];

Thanks,
Barnaby.

Re: How to set a StringList variable by code?

Posted: Thu Apr 04, 2019 3:42 am
by Barnaby
I've found one that works

Code: Select all

viewer.report.setVariable("Test", ["A"]);

Only issue is that it doesn't update the Paramaters Panel with the selected values. Is there a correct way to do this?

Re: How to set a StringList variable by code?

Posted: Fri Apr 05, 2019 11:54 am
by Lech Kulikowski
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.