2 weeks ago
I have a click Button to insert a new member into diemnsion
I have 1 input field for the ID and Description (its the same)
and i want the user to choose a category (property) from a drop down
also i want to define the heirarchie to be equal to H2 always
i wrote a script but its not working
NEED YOUR HELP IN THE DESCRIPTION FROM DROP DOWN AND INSERT A VALUE TO THE HIER COLUMN
var dim="Cause";
members = {
id:InputField_1.getValue(),
description:Dropdown_1.getValue()
H2:getValue(H2)
};
var status = PlanningModel_1.createMembers(dim,members);
if (status===true){Application.showMessage(ApplicationMessageType.Success,"master data is created");}
else {Application.showMessage(ApplicationMessageType.Error,"something is wrong,try again");}
Thank you very much
Hi,
maybe you can try this (assuming H2 is the name of your hierarchy)
var newMember = cast(Type.PlanningModelMember, {
id: InputField_1.getValue(),
description: InputField_1.getValue(),
hierarchies : {},
properties: {}
});
newMember.hierarchies['H2'] = { parentId: '<Member Id of the Parent>'};
newMember.properties['<nameofyourproperty>'] = Dropdown_1.getValue();
This example is very minimal, I would suggest to do some input validation for the values provided by the user beforehand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @DanielVisblut please check through the below blogs, these should help to resolve your issues.
SAP Analytics Cloud Application to add Master Data to a planning model
Update master data of dimension using JavaScript in Analytical Application
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
you need to use those API's to get values (id or text) from dropdowns :
Dropdown_1.getSelectedKey();
or
Dropdown_1.getSelectedText();
I think you are going to have some problems with -> getValue(H2) I'm not sure you can use this line like that. What is the goal corresponding to H2 ?
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
11 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.