Expand my Community achievements bar.

Loops through listbox for value, if does not exist, provide a error message.


Level 2


I have a listbox with Profession (text) and Price (value). I am using another field which they type in the profession. if the profession exists, bring back the price, if not, show an error message instead. Has any encountered this or know how I would go about solving scripting this?

My loops looks for the values but if it isnt found, it will just go to the first entry.

1 Reply


Level 2

FYI, here is my code:

var oArr = [textbox].rawvalue

var oList = xfa.resolveNode([listbox].somExpression);

var oListIndex;

while (oArr.length!=0){

oListIndex = [listbox].boundItem(oArr.pop());