on 06-20-2017 5:15 PM
I'm trying to make it so that the key selected in the top dropdown automatically populates the input box below:
The code is really simple, triggered by the only event available for dropdowns ("onSelect"):
session.findById("wnd[0]/usr/ctxtYPCN-PCTYPE").text = session.findById("wnd[0]/usr/subPersonas_149796688890599/cmbPersonas_14979739727949").key;
However, the onSelect event seems to fire before the dropdown's value updates. For example, when I make my first selection, nothing happens (because it's pulling the placeholder value):
... and then when I make more selections, the script pulls the previous key:
Is there a way to get onSelect to behave as you'd expect? If not, what is the onSelect event supposed to actually be used for? Should this script be attached to onAfterRefresh instead?
Hi,
the select event offers you a variable named "newKey"
try it like this
session.findById("wnd[0]/usr/ctxtYPCN-PCTYPE").text = newKey;
best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.