Now I got this message in console:
Valuelist: vl_lunch_break_duration used with different types
The valuelist was already created for type: NUMBER
for the dataproviders: _tw_lunch_break_duration
So it can’t be used also for type: INTEGER for the dataprovider: ps_tw_lunch_break_duration
Please check these dataproviders of this valuelist: vl_lunch_break_duration
I have two questions regarding this:
(1) Is it possible to explicitly set and change the data type of a valuelist? (As in the valuelist edit form there is no data type field)
(2) _tw_lunch_break_duration is a JS variable, and in JS there is no data type integer but only number
Now I have also the table-field ps_tw_lunch_break_duration, and created it as an integer.
When I want two listboxes with the above value list, one for _tw_lunch_break_duration and one for ps_tw_lunch_break_duration,
does it mean I need two different value lists with type number respectively integer, to avoid that red message in console?
It seems Servoy sets the data type of a valuelist at runtime, when the form with the combobox and its valuelist is shown.
So when one combobox has a dataprovider with type Number, and one combobox has dataype Integer, as in my example above, I get always an error message when I show the other combox after the first one.
I created now two identical valuelists with different names like
vl_lunch_break_duration_integer
vl_lunch_break_duration_number
and attached them to the dataproviders with the respective data type, and the red console message is gone.
Your variable is a form/global variable, right?
For those there is a distinction between integer and number. You should be able to change the type of your variable and use one valuelist.