Trying to combine the values of two fields in xpages

I am new to xpages and I’m trying to take the values contained in two combo box fields and combine them together into a third field. As the user selects the values from the two combo boxes, I want the values to appear in the third field. I’m not sure how to do this and I haven’t found anything similar in the tutorials or forums.

Thanks.

Subject: One option

Assuming your 3rd field is an edit box (“inputText1” in my example), you could set it up so its value (Data tab) is calculated via Javascript:

var a:String = getComponent(“comboBox1”).value;

var b:String = getComponent(“comboBox2”).value;

a + b;

where you replace “comboBox1” & “comboBox2” with the names you’ve assigned to your 2 comboboxes.

Then add a partial refresh to each combobox’s “onChange” event (you may need to add this to other events as well, but I think that should work for comboboxes) to partial refresh your 3rd field.

Hope that works for you.

Subject: works great

Thanks for your help.