![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all . I was under the impression that there would be some function that allowed me to move between an item in a predefined value list, and it's position in the list. For example, if I had a value list of months, then I could take the value, and look to find its position in the list. This seems to not be an available function, probably because a list can change at any time and kill you data. And yes, I'm trying to emulate an 'enum'. It seems that the right thing to do would be to go relational-crazy and use a table for a value list, and the primary key numbers and values are fixed. For example, record #1 is 'January;, #2 is 'Feb, etc. Sound good? |
#3
| |||
| |||
|
|
Very good, and I don't call it relational-crazy, I call it sound practice! It is much more easy to work on a table then to work on a hardcoded value list. Say that you would have to translate all those months in a hardcoded list. You would not only have to change the list itself, but change all the names of the months you already had entered. Now with a value list in a table (With proper ID's in place) you would only have to translate the months. Since you refer to the ID all the references will be updated at once. |
|
Ursus "Mike" <exceptionsTakeMeOut (AT) earthlink (DOT) net> schreef in bericht news:2007010705272475249-exceptionsTakeMeOut (AT) earthlinknet (DOT) .. Hi all . I was under the impression that there would be some function that allowed me to move between an item in a predefined value list, and it's position in the list. For example, if I had a value list of months, then I could take the value, and look to find its position in the list. This seems to not be an available function, probably because a list can change at any time and kill you data. And yes, I'm trying to emulate an 'enum'. It seems that the right thing to do would be to go relational-crazy and use a table for a value list, and the primary key numbers and values are fixed. For example, record #1 is 'January;, #2 is 'Feb, etc. Sound good? |
#4
| |||
| |||
|
|
On 2007-01-07 06:08:49 -0500, "Ursus" <ursus.kirk (AT) wanadoo (DOT) nl> said: Very good, and I don't call it relational-crazy, I call it sound practice! It is much more easy to work on a table then to work on a hardcoded value list. Say that you would have to translate all those months in a hardcoded list. You would not only have to change the list itself, but change all the names of the months you already had entered. Now with a value list in a table (With proper ID's in place) you would only have to translate the months. Since you refer to the ID all the references will be updated at once. Thx. It seems to work well and to make sense. What I've done so far is have the value list use the 'second field' option, so I get 1 jan 2 feb... and so on. However, this field relates to, stores, and displays the primary key, so you sort of lose the month name once you make a selection. I can get the name from the relation, but I'd prefer the user to see the month by name of course. I could have the primary key in the Months table be the actual month name, but that's Bad. Ursus "Mike" <exceptionsTakeMeOut (AT) earthlink (DOT) net> schreef in bericht news:2007010705272475249-exceptionsTakeMeOut (AT) earthlinknet (DOT) .. Hi all . I was under the impression that there would be some function that allowed me to move between an item in a predefined value list, and it's position in the list. For example, if I had a value list of months, then I could take the value, and look to find its position in the list. This seems to not be an available function, probably because a list can change at any time and kill you data. And yes, I'm trying to emulate an 'enum'. It seems that the right thing to do would be to go relational-crazy and use a table for a value list, and the primary key numbers and values are fixed. For example, record #1 is 'January;, #2 is 'Feb, etc. Sound good? |
#5
| |||
| |||
|
|
Hi all . I was under the impression that there would be some function that allowed me to move between an item in a predefined value list, and it's position in the list. For example, if I had a value list of months, then I could take the value, and look to find its position in the list. This seems to not be an available function, probably because a list can change at any time and kill you data. And yes, I'm trying to emulate an 'enum'. It seems that the right thing to do would be to go relational-crazy and use a table for a value list, and the primary key numbers and values are fixed. For example, record #1 is 'January;, #2 is 'Feb, etc. Sound good? |
#6
| |||
| |||
|
|
What I have done in the past is making the selection field as small as is practical, then dragged the related field nex to it (and locked it). So when the user chooses and tabs out his choise is permanently displayed. Ursus |
![]() |
| Thread Tools | |
| Display Modes | |
| |