Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

addItem /boundItem problem

Not applicable
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
pguerett
Level 10
Level 10
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?