In my dashboard, I set the queries to (Load in Script) = True. I do this because I want to set variables before the script is executed.
I have a line of code that sets the variable:
APPLICATION.setVariableExt("psACCOUNTNUM", activeAccountNum);
I then load the data source (I am hosted in BI Server, universe based on HANA models)
DS_1.loadDataSource();
The model that the query is based on has a default value for AccountNum, and when the query loads it uses this default value.
Later in the code I set the value again,
APPLICATION.setVariableExt("psACCOUNTNUM", activeAccountNum);
And this time, the query will return the correct data for the set account number.
It seems as though in order to use setVariableExt that that query must be initialized? Is this true?
Thanks.