Getting the selected value from a combobox

This is one that seems to have driven people crazy over the years. Is there a simple way to deal with this? Thanks.

Situation:

  • Using Comboboxes in a DialogBox to populate some fields in a VERY complex form.

  • Using @DbLookup in the Comboboxes to select a value in each field.

  • I need to save the selected value in a different fieldname in the form. (Same DialogBox field populates a series of fields in the main doc.)

  • Using GetItemValue returns null even if a value was selected. How do I get around that? Thanks!

Subject: Button with code

When I want the user to select a value then do a lot with the returned result, I make the field computed and add a button that presents a data set the user can select from and then run code on the result. If I need a value and nothing is returned, I let the user know and stop executing the code.

Subject: I figured it out

I thought I was going crazy because one field worked and another didn’t. It turns out the DbLookup values in the second case were two lines and somehow that was messing everything up. I changed it to one line and then all was well.

Subject: Button with code

When I want the user to select a value then do a lot with the returned result, I make the field computed and add a button that presents a data set the user can select from and then run code on the result. If I need a value and nothing is returned, I let the user know and stop executing the code.