cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdownlist onSelect Error

ssm123
Explorer
0 Kudos
254

Dear Community,

Last month I implement two dependent dropdpwnlist according to this article:

Dropdown scripts using onSelect event return incorrect key | SAP Community

Now it seems that newKey is not working. Any information about this? How can i solve this issue?

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

ssm123
Explorer
0 Kudos

Thank you very much Brian and Cristin! What I have realized is that you are right, there´s nothing wrong with your scripts but when I make some tab merging and modifications in the miro app, the newKey seems that it does´t work proporly.

I´ll keep cheking!

Thanks very much for your help!!!

cristin_charbonneau
Participant
0 Kudos

Hi Silvia.

I'm using newKey to switch flavors (onSelect event) based on a dropdown list I defined and it's working. This is my code (I changed the "changeFlavor" to an alert for demo purposes):

// ChangeFlavor

var flavorKey = session.findById("wnd[0]/usr/cmbPersonas_166142884042230").key;

var flavorKey = newKey;

//session.utils.changeFlavor(flavorKey);

session.utils.alert(flavorKey);

Kindly,

Cristin

Brian_Wills
Contributor
0 Kudos

Hi Silvia,

I have not tried the "newKey" before. I currently put my script in the "onAfterRefresh" event.

zDropdownBoxKey = session.findById("wnd[0]/usr/cmbPersonas_157003793955797").key;
zDropdownBoxText = session.findById("wnd[0]/usr/cmbPersonas_157003793955797").text;

This will contain the currently selected key and text.

Hope this helps.

Thanks,

Brian