on 2024 Oct 21 4:37 PM
Hello Everyone,
We have a bex query with customer exit variable.
We create a new optimized story on live connection to this bex query.
We have this small script on the onActive Function of the Chart 1 :
var VariableQueryCurrentWeek = Chart_1.getDataSource().getVariableValues("XXXX")[0];
CurrentYear = cast(Type.SingleVariableValue, VariableQueryCurrentWeek).value;
console.log(CurrentYear);
(Note that is the same for : Application.getFileDataSource("CVAZVJGAC").getVariableValues("XXXX"); )
When we first launch the story in view mode we have the following error message on the console : " Cannot read properties of undefined (reading 'value') "
Which is normal as it haven't found any value for this variable even if the bex query is well filtered according to the customer exit variable.
But then when i change the page on the story and comeback to the previous one, now it is working fine.
I don't really understand what hapenned
Do you have any idea how to fix this issue and have the variable the first time we load the page in view mode ?
Thank you in advance
Best Regards
Request clarification before answering.
I am not that familiar with these APIs, but https://help.sap.com/doc/958d4c11261f42e992e8d01a4c0dde25/release/en-US/index.html#DataSource_MgetVa... suggests to use "This method may return outdated values with SAP BW dynamic filter variables. Use getDimensionFilters() instead if you are interested in their current values."
Would that work in your case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vitaliy,
Thank you for your answer.
However this is not working.
The getDimensionFilters() only retrieved the selected story filter values and not the customer exit of the bex query.
Best Regards
User | Count |
---|---|
41 | |
15 | |
10 | |
9 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.