Getting the description from dropdown list
Just a quick check. My WD program have a set of dropdown list (by key) which is derived and populated by a complex series of logic.
Now I need to update a textview of the description of dropdown list I select. I don't want to go through the complex codes again just to retrieve te descriptions but I want to directly access to the valueset to retrieve the description. I tried "gettext()" but it's giving me error.
Anyone kind enough to provide me some snippet of codes to directly access to the selected description of my dropdown list? points will be awarded for useful answers....thanks.
Fahad Hamsa replied
Let the attribute bound to DDKey be Val in Context.
You will be putting key-value to DDKey by
To get the text of the dropDown, first get the key of the dropDown selected by
Now u can get the value of this key from the SVS variable of DDby Key
The key is case sensitive, so ensure the case also.
U can check the existence of the key by
and value by