Skip to Content

Reset Personas 3.0 Drop-Down List

Hi,

I saw a similar question posted from last year, and it appears the issue was resolved, but a clear solution was not given in that post, and it doesn't look like I can add to that question, so I'm starting a new one.

I have a drop-down list on a flavor, which provides four entries:

----- Options -----

Option 1

Option 2

Option 3

The drop-down works fine, but after the user makes a selection, it remains selected. What I would like to do is to "reset" the drop-down back to '----- Options -----' after I have processed the option the user selected.

From the previous post I found, it appears that I should be able to set the key value for the drop-down back to the value for '----- Options -----', but that does not work.

I've tried using the record feature while I set it back to the first choice, but when I run the recorded script, it does not reset the drop-down (the script records a number of lines, but mainly it is resetting the key value and the text value for the drop-down.

Can anyone tell me how to reset a drop-down to the first value (or any value for that matter)? Thank you very much for your help!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 28, 2017 at 06:28 AM

    Hi Jeff,

    try something like this:

    if (newKey == "[selectedkey1]"){
    	do something....
    	// set the old key to dropdown
    	session.findById("wnd[0]/usr/cmbPersonas_150122039026632").key = session.findById("wnd[0]/usr/cmbPersonas_150122039026632").text;
    	// Screen Refresh
    	sap.personas.scripting.executeScriptInternal({src:''});  	
    }
    if (newKey == "[selectedkey2]"){
    	do something....
    	// set the old key to dropdown
    	session.findById("wnd[0]/usr/cmbPersonas_150122039026632").key = session.findById("wnd[0]/usr/cmbPersonas_150122039026632").text;
    	// Screen Refresh
    	sap.personas.scripting.executeScriptInternal({src:''});  	
    }
    ....
    
    Add comment
    10|10000 characters needed characters exceeded