Skip to Content
0
Former Member
Mar 18, 2016 at 06:38 AM

SAP Screen Personas 3.0 - Update GuiComboBox

152 Views

For SAP Screen Personas 3.0 I’m trying to dynamically update an existing GuiComboBox

The entries is held by a GuiCollection

GuiCollection API has a function call add(Object item)

When I try to use add() it gives me following error"

oPrivateInstance.aElements.push is not a function

The object I try to set as input-parameter is the element object retrieved from GuiComboBox.entries.elementAt(i);

Example code below:

var dropDownObj = session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/cmbPersonas_1458022736755");

var dropDownTargetObj = session.findById("wnd[0]/usr/cmbPersonas_1458268186725");

for(var i=0; i < dropDownObj.entries.length; i++) {

var element = dropDownObj.entries.elementAt(i);

alert(element.key); //Succsessfully print out the key value

dropDownTargetObj.entries.add(element); ERROR

}

have been trying to use the

var element = {key: "B", value: "Limit"}; but does not work either

Anybody that has successfully used the GuiCollection.add(Object item) ?