self-made value list not immediately available

Hello,

I have a custom value list that is filled by a query. That value list is attached to text fields (not a combobox!). The fields are non-editable (I need the value list only to show the display value of that field). OnLoad of that form the value list is created. The problem now is that once the form is shown, the real values of the fields are shown instead of the display values. Once you click in the field, the display value appears…

Thanks
Patrick

I have had to work around that several times, it would be nice if this was not the behavior

Hi Patrick,

I have had intermittent behavior as you describe (very rarely) on a valuelist field. I think I might have solved it with a global method which I describe later. Anyway I presume you have restarted the application and got similar results. These two things come to mind:

  1. I quickly checked one of my solutions that has a combo box and a textfield with valuelists filled as you describe. The big difference is that they are both editable and ‘empty’ because both are globals and need user selection. When I make them non-editable I get (I believe) similar behavior on the text field (can’t tell for sure as it is a global and thus empty).
    I’m sure you have thought it out but I’m confused about the situation where one would fill a valuelist by query, need to have a non-editable field that is not a combobox and yet be able to show users other choices. If they just need to know what the choices are wouldn’t a combobox work if it displays it correctly since they can’t change anything anyway? And if it is non-editable they won’t be able to click in it to show the other values anyway in a text field (but I think they can in a combobox). (Or do Comboboxes allow change even if is marked non-editable?)

  2. I also looked at two other forms that have the same queried valuelist for the same dataprovider field but on one of the forms the field is non-editable and the other the field is editable. The non-editable one is straight text, the editable is type_ahead. The non-editable shows the display value (not the id) but, because it is non-editable, I can’t actually see the valuelist when I try to click in it. The other is editable (type_ahead) and behaves correctly.

If the non-editable, text field behavior that I described in 2) is OK for you then the only thing that I can think that might explain the difference is that I run the valuelist query not on loading the form but as a global method when the whole solution is first opened. I’m not sure that I did it for that reason but it is possible so you might try checking that. Again though, while such a non-editable textfield with valuelist will correctly display the value that you want (display rather than return), it won’t allow the user to see the other choices available.
HTH