I think I’ve isolated this oddity, but it is really “odd” {
It’s perhaps best described by first noting two scenarios where valuelists do work “as expected”:
(1) A form field with a dataprovider being a global and having a valuelist being a set of values listed in the valuelist: I can set the global and when the form is displayed that value is displayed in the field, regardless of its position in the valuelist
(2) A form field with dataprovider being a db field and having a valuelist being a set of values from a DB table: again I can set the dataprovider and when the form is displayed that value is displayed in the field
I guess you know what word comes next: “BUT”…
With a form field with a dataprovider being a global and having a valuelist being a set of values from a DB table: no matter how I set the global dataprovider, the form is displayed with a blank in this field
“Why are we doing this?” Quite simple really: we want the operator to be able to choose a value from a pre-defined set, and often we can set a “likely” value as default - if this works just fine then for those “likely” cases the operator doesn’t need to mess with that field. Sometimes the field is not a DB field, so a global is needed (Grumble: because we don’t have the option of a form-local non-db dataprovider). Rather than hard-coding these valuelists in the solution, it’s more flexible to make the list table-driven.
Thanks,
Neale.