The valuelist was already created for type: TEXT
So can’t be uses also for type: INTEGER
Please check for dataproders that uses this valuelist: someValueList
The value list is generated by method, so basically a placeholder (Custom values: empty). In the form the value list is attached to an integer field and a text field. The method takes care that it is built correctly. This should not produce an error. Otherwise we are forced to differentiate our (anyway quite useless) placeholder value lists by all data types they might get attached to.
I have valuelists with integer values put into dataproviders with globals of type text. This caused the error. Fixing was done easilty (although I really didn’t like it) by replacing the text globals with integer globals…
I don’t feel like fixing this. I use lots of value lists for different purposes and I can’t see why they have to be data type compliant. I can take care of that.
you cann’t mix types.
If a valuelist is used for type X then it can’t also be used for type Y. Because the values don’t match.
It is not really an error but a warning that you have something wrong in youre solution.
For example if you have 2 combo’s both build on the same valuelist. And one sits on top of a integer but the other on top of a number. Then one of the 2 won’t select it’s value property. Because it can’t match a Integer 0 doesn’t equal to a Double 0.0 … (or if one is text its even worse)
The first time a custom valuelist is loaded it will convert its real values to the value of the dataprovider its build on. (So it wil match)
But if then the same custom valuelist is also used by a completely other dataprovider of the another type. We can’t match correctly.
Another option would be to create a copy and make a completely new custom valuelist based on the second dataprovider. But then the values won’t be shared (so changes to the one doesn’t affect the other)
My problem is that I use one value list for many things. For example, I have a search form that allows a user to choose any field and enter search criteria. Now some of my fields have value lists and even worse, some only store an integer that points to another table for the value. My users don’t know and don’t care about the IDs of a country or whatever. I want to present a value list that shows the names. In order to be able to do that I am building that value list on the fly (basically when the user chose the field he wants to search). Since I don’t know which field is about to be searched, I have all kinds of fields in the search form and show them when I need them. So there is a text field, a text field with value list, a date field, an integer field, an integer field with value list etc.
Now the problem: If I confirm to this error, I would have to create all kinds of value lists (just Text, ID/Text, ID, …) and take care in my method which one I need to fill. Today I have one method the retrieve the values, set those values in one value list and attach one value list to any field.
To make a long story short: Couldn’t you disable that “warning” if the value list is a custom list?
no it is just there for custom valuelist.. There is where the problem lies in.
Custom valuelist types can’t be mixed if used for multiply things at the same time. Very strange selection problems can then arrise. We have to warn developers for that.
no it is just there for custom valuelist.. There is where the problem lies in.
Johan, there is one thing I don’t understand: with a custom value (that means “empty”) list attached to a field, how can you know when to throw an error or not? You have no idea how I will populate the value list I really understand (and find it useful) if you check for datatypes returned by database driven value lists (“Fixed” instead of “custom”), but I thought and expected a custom list is “custom” in every way. Maybe you can give this a second thought or do I have a slow day ?
no i know it because i know the dataprovider you attach it to!!
By default i don’t know nothing about a customvaluelist.
But if you attach that valule list to a “myinteger” dataprovider then i know what the realvalue of the valuelist is or should be. (an integer)
If you attach it then to another dataprovider called “mynumber” then suddenly the realvalues of the valuelist must be numbers..
But then i see that it was already an integer… So Warning…
So a custom valuelist is custom in everyway. You can store what ever you want in it. I really don’t care. only Display values of type X, or Display as string and Real values as Integers. I don’t care. Only Don’t mix the valuelist where it should map on.
I can’t test for everything, because if you fill the custom valuelist youreself with integers but the dataprovider you attach it to is a number or string then you could have a problem that it doesn’t match quite right. We are trying to fix this as much as possible but we can’t guarentee it 100%. So here it is youre responsibility!
if you have that warning then you have most likely a bug in youre solution. We have solutions ourself where we had those problems and because of that very strange problems surfaced.
Just don’t mix custom valuelist with different types of dataproviders. Strange behaviour is very likely to happen.
And why would you turn it of in the developer? That is completely turning it off everywhere. Where would you else see it?
I don’t use custom valuelists.
I have valuelists based on a table. it shows text and is returning an integer in a TEXT field.
Why is it a TEXT-field?
Because so we started 1,5 years ago in ouer solution!
Than later on we needed to change it to return an integer (instead of text) and this is working fine! (the only thing you have to remember that if you use this field in a method, you must use: if(field==“1”) instead of: if(field==1) )
This was working fine, until now. We have to change now every field, by hand, by a 3 party tool, by every customer from TEXT to INTEGER.
If it was one field, oke! But we have several, all over the solution!
I hope this clarifies more how some situations are as they are.