Skip to Content
Former Member
Nov 10, 2006 at 08:55 PM

DropDownByKey - Extracting "Value"


I have a WD project where I want to extract the value and not the key from the DropDownByKey to save to my database. Due to problems with my dev system I cannot use the debugger so I am trying to figure out why I get a run-time error out of the following code:

String s6 = " ";

String selected_key = wdContext.currentReceiptElement().getLoggedBy();

String attributeName =


IWDAttributeInfo attributeInfo =


ISimpleType simpleType = attributeInfo.getSimpleType();

ISimpleValueSet valueset = simpleType.getSVServices().getValues();

if (null!= selected_key) s6 = valueset.getText(selected_key);

My DropDownByKey dropdown is called LoggedByDropDownByKey, my context element is called AddressedTo.

When I take out the ISimpleType simpleType... line and what follows it the runtime error goes away but I am thinking it's a problem with the String attributeName... line. Any help would be appreciated. Points will be rewarded promptly!