cancel
Showing results for 
Search instead for 
Did you mean: 

setVariableValueExt and Data Refresh

0 Kudos
248

I have seen discussions on topics similar to this, but i am hoping to get the absolute behavior.

From the User Guide:

Sets query variable values in external key format, then executes the data source query again.

I am using 1.4 hosted on SAP BI, universe data source, HANA models

I used to set up to five variables and then use the DS.loadDataSource() method to load the query. But this was taking a while. I now only set variables if needed.

Then, I eliminated the LoadDataSource() call, but the data sources did not always load after the variables are set.

I saw in another post where Karol said that if you set multiple variables, the data will not not, until all variables are set. How does it know that all variables will be set? What if I only set one of the three variables that a data source depends on? If it cannot know all the variables are set, then will it load data for set variable set? Do I have to set all variables for it to automatically relaod, and if I do not set all of the variables, then do I have to explicitly call loadDataSource? When the BI version, there is no reloadDataSource() - actually there is, but it doesn't do anything.

So to sum it up:

  1. If a data source has multiple variables, do I have to set all variables to cause an implicit data load?
  2. If I reset a variable that multiple data sources depend on, will all the data sources refresh?
  3. If I do not set all of the variables that a data source contains, will it implicitly refresh? And, when?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I am hoping that this question can be answered:

  1. If a data source has multiple variables, do I have to set all variables to cause an implicit data load?
  2. If I reset a variable that multiple data sources depend on, will all the data sources refresh?
  3. If I do not set all of the variables that a data source contains, will it implicitly refresh? And, when?
Former Member
0 Kudos

My guess here is that the variable container would apply on a similar way also for UNX (Blog is for BICS):

http://scn.sap.com/community/businessobjects-design-studio/blog/2014/03/27/design-studio-performance...

in that case that would be:

1. No

2. Yes

3. It will refresh when one of the variables is set.

Best regards,

Victor

0 Kudos

Thanks Victor.

So, as I understand it:

  1. If I change a variable, then all queries that contain variables are invalidated.
    • This does not mean that they will immediately refresh.
    • It does mean that the next time I try to access an invalidated query, it will refresh before allow access.
    • It does mean that I can set any variables, in any order, and no query will refresh until I try to access it, or explicitly refresh it.

Please let me know if you agree to the above.

Former Member
0 Kudos

A refresh should be triggered automatically to all involved queries with the variable in common, on top of this, not involved queries are invalidated but not refreshed.

Also if you are not using a component, the data source will not be refreshed at that moment, but when you actually use it.

So when you Set a variable, the corresponding data source should reflect the data after the set variable.

All of this is the standard case on BW, there is a possibility though that things behave a little bit differently when using UNX.

Best regards,

Victor

0 Kudos

Thanks.

If I have five queries, each with three variables.

I want to set all three variables, and then access data in only one of the queries.

  • APPLICATION.setVariableValueExt("0VAR", "zzzz");
  • APPLICATION.setVariableValueExt("1VAR", "yyyy");
  • APPLICATION.setVariableValueExt("2VAR", "xxxx");

Does this mean that all three queries will refresh after each setVariableExt call? For a total of 15 refreshes (3 for each of the five queries)?

Sometimes, after I call setVariableExt, I will access the data source, but it has not refreshed. I have to explicitly call loadDataSource and then access the data source. If the above is true, then how come i observe this behavior?

I am using a HANA data source through a universe on the BI Server. I am hoping that we can straighten this out, because it is very important. When populating a listbox, the filters on data sources are ignored (getDataMemberList) and we have to use variables.

I guess in this case, it is better to use distinct variable names in each query. This way, you can manage when they are to be refreshed.

Answers (0)