Expand my Community achievements bar.

addItem /boundItem problem

Avatar

Former Community Member
Hi,



I cannot get the $.boundItem(xfa.event.newText) to return the value associated with the dropdownlist selected name.



TF.rawValue= $.boundItem(xfa.event.newText)



I just get a blank field in the textfield box.



I can retrieve the name using xfa.event.newText in the change event for the drop down list.



The drop drown list initialize event is loading the names and values using the addItem()



while(!oDB.isEOF())

{

DDL1.addItem(oTextNode.value, oValueNode.value);

oDB.next();

}



The oTextNode.value and oValueNode.value seem to be correctly presented to the addItem during the while loop.



Is there something that could explain why I can only see the oTextNode.value and not the oValueNode.value with the boundItem()?



Thanks,

Steve
1 Reply

Avatar

Former Community Member
I do not think it is the boundItem that you want ....it is the formattedValue property.



The boundItem will return to you the value associated with the Text passed to it.



DropDownList1.boundItem(DropDownList1.formattedValue);



This will be the same as DropDownList1.rawValue.



Make sense?