Capture dropdown response

Avatar

Avatar

BCinHOU

Avatar

BCinHOU

BCinHOU

15-12-2010

A while back I had a consultant build me a form that performs a look-up to EDCPRINCIPALENTITY to resolve names.  It takes result and populates a downdown list to present a list of matching user name.  The user can then select a name from the list and the response gets bound to their Login-ID.  Works great.  Unfortunately, this particular workflow has a secondary assignment step where the next user can see the prior response from the previous user and the form uses the same logic.

I've partially corrected my problem.  I need to grab value from a login variable that the user selected from the dropdown and assign it to the name variable.  Should be easy enough.  But for some reason it is only grabbing the value of that very last item in the drop-down list rather than the value that the user selected.  I've got the problem narrowed down to somewhere in the following code:

parent.login.addItem(lastName

+ ", " + firstName + " (" + titleName + ")", login );

if (first == 1) {

first

= 0;

firstID

= login;

}

pos

= currentStr.indexOf('<Login type="VARCHAR2">', pos);

firstPos

= currentStr.indexOf('<FirstName type="VARCHAR2">', firstPos);

lastPos

= currentStr.indexOf('<LastName type="VARCHAR2">', lastPos);

titlePos

= currentStr.indexOf('<Title type="VARCHAR2">', titlePos);

}

// Set default value to the first item in the list.

parent.login.rawValue

= firstID;

parent.name.rawValue

= pos;

parent.name.presence

= "invisible";

parent.login.presence

= "visible";

parent.btn_clear.presence

= "visible";

parent.btn_search.presence

= "invisible";

So if I change line "parent.name.rawValue = lastName + ", " + firstName + " (" + titleName + ")";

Then the data is formatted the way I want ...but it selects the last value that was in the drop-down list, rather than what the user selected.  How do I transfer the value selected from my "login" variable in the dropdown box into my "name" variable which will be presented into a simple text box?

View Entire Topic

Avatar

Avatar

Rui_Esteves

Avatar

Rui_Esteves

Rui_Esteves

16-12-2010

Value = this.boundItem(xfa.event.newText)

Text = xfa.event.newText