New Entry Not Being Selected in Picklist when Passed in URL

New Entry Not Being Selected in Picklist when Passed in URL

If you have a picklist which is not a lookup that is a listbox, radio button, checkbox, or multi-select; the entry is not being selected when the entry is being passed in the URL, unless the entry existed at the time the form was created.  This problem does not occur if the picklist is a lookup.

For example, suppose you have a listbox which is not a lookup named LISTBOX that has 2 entries named A and B that you added during edit mode when the form was created.  If you use the ui.add() function in the On Load section of the form to add another entry named C, then entry C will not be selected when your URL contains:

?LISTBOX=C

But, if the URL contains:
?LISTBOX=A
or
?LISTBOX=B
The entry is selected.

This problem does not depend on whether the entry is or is not in the database because if you change the listbox to be a lookup, then entry C is selected even though it’s not in the database or created during edit mode.