on 03-05-2020 11:37 AM
Setup: Creating Analytic Application on SAP Analytics Cloud Version 2020.2.1 using a BPC Live Data Connection
We are trying to change the values of the parameter variables of our data model without having to open up the typical dialogue box.
Changing the variables of a live data connection in the App Builder View happens via Data > Edit Prompts:
We have managed to create the same view in the Present View (Run Analytic Application) using Table_2.getDataSource().openPromptDialog(). Ideally, however, we would like to set the variable values in the script, not using the dialogue box. One option would be to create a dropdown filter containing the variable members, essentially creating our own prompt dialogue box. To do this, we need access to the members of the variables. So far, we have only found getVariables() and setVariableValue() APIs that don't fulfill our needs (getVariables gets us the variables correctly, but not the members of the variables). Is there any way to extend these APIs to access the members of the different variables?
In addition to this, we have tried setVariableValue() by hardcoding the inputs using the Variable ID and the member ID, but got the following error:
Would appreciate any tips regarding accessing the members of parameter variables and why setVariableValue() doesn't seem to be working for us!
2021 Q4 - should have new functionality on writing to unbooked data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
on SAC version 2020.2.10
In my project, I'm not using SetVariableValue(), but SetUserInput() for what I want to do.
Not sure how much it will help you,.. but to get my script working I had to set the table to
-use planning
-use a flat hierarchy
-show unbooked Data (the field I want to change must be editable in the table itself)
My dimensions and measures come from other "lookup tables"
Here I selected 1 field to see what it returns and then change the date dimension for before using SetUserInput. Next step would be to create the "mySelection" as a string by myself.
var mySelection = tblMain.getSelections()[0];
console.log(["before edit",mySelection]);
mySelection["Version"]="public.TEMPLATE-0"; //set another Version
mySelection["Date"]="[Date].[FYP].&[201802]"; //set another Date
console.log(["after edit",mySelection]);
tblMain.getPlanning().setUserInput(mySelection,"0");
tblMain.getPlanning().submitData();
To get a list of my measures I found this code
var selectionsArray = tblLookup01.getDataSource().getDataSelections();
console.log(selectionsArray);
for (var key = 0; key < selectionsArray.length; key++){
var obj = selectionsArray[key];
console.log(obj["@MeasureDimension"]);
console.log(obj["Date"]);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone!
Same issue here. Please let us know if you found any way around it.
Kind regards,
Kostia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
we got the same requirement, if you got solution for this already could you please update the same.
Thanks,
Bhargava.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.