on ‎2017 Dec 23 9:18 AM
Hello,
1) I'm trying to set BEx Query variables from my Design Studio application. The variables are formula variables - that is, they represent floating point values that are used in a formula within the query (a calculated key figure, if that makes any difference). I want the correct formula value to be calculated once I set the variables.
I've loaded the data source and then used DS.setVariableValueExt for both variables. I have to first convert the values from float for this to work, I'm using Convert.floatToString (although I've tried just adding "" as well).
I've tried using reloadData to force the query to refresh with the variable values, however I don't appear to get results either after reloadData or after the code.
I've tried several ways of using getData, even for specific member values, but I don't get a relevant result.
I've tried showing the query results in a crosstab which also doesn't seem to show the values for the formula - all it does is show "NOT EXIST".
I have full control of the query and the variables.
2) An additional requirement is to have the variable values available for a cmod calculation in a characteristic value variable.
Thanks for any help,
Shai
Request clarification before answering.
Hi Shai,
I have just tried a simple example of a BEx Formula Variable used in a Calculated Key Figure and it works as expected. My sample code looks like this:
var myValue = 1.2875;
var myVariableValue = Convert.floatToString(myValue);
DS_1.setVariableValueExt("ZVAR_PERCENTAGE_UPLIFT", myVariableValue);
And my BEx Formula Variable is defined as follows:




Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the exact same settings, which made me realize that this was some sort of issue with the formula.
The formula is a calculation based on two input formula variables and two replacement path variables, replacing from a characteristic attribute. The "Not Exist" output seems to occur when trying to include both a replacement path variable and an input variable in the same formula.
This seems to be inconsistent. during my experiments the full formula suddenly worked for some reason. My take from all this is to separate the variables into different formulas and then use the partial formulas for the final calculation.
Mustafa - Thank you very much for your help!
- Shai
| User | Count |
|---|---|
| 7 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.