While the details of your relationship are helpful, more info would also help us to help you.
There is more than one way to set up a conditional value list. How did you set this one up?
What does the data look like?
If you set up a portal to VL_Eaim_Reason on a layout based on IO_n, can you get that portal to list the values that you want to see in your conditional value list?
Note that for a relationship based conditional value list, what context--what table occurrence you specify for your layout and possibly for a portal on the layout where you want to use the value list is critical.
More explanation below, but Phil you are correct that it's how the VL is set up that is the problem. I'd assumed that the relationship I set up would filter VL records that have the min-max band in which the IO_n::rx_kcal_pc value fits. Instead the VL records are listed according to the VL min-max values, ie. it's the VL that dictates the list, not the O_n::rx_kcal_pc value.
The data is shown on a 'Patient' table layout. When a particular 'IO' record is selected on the 'Patient' layout, a script sets Patient::IO_n to IO::uuID. Patient::IO_n is related to the IO_n::uuID TO.
IO_n::Reason is the popup field on the Patient layout that should be populated from the value list. When I put a portal from VL_Eaim_reason on the Patient layout, is lists all 'Reason' records if I relate:
IO_n::rx_kcal_pc < VL_Eaim_reason::Aim_max,
all 'Aim_reasons' are listed in the popup. However, as soon as I add
IO_n::rx_kcal_pc > VL_Eaim_reason::Aim_min
the VL is reduced to the list with lowest Aim_max.
Please show a screenshot of the dialog where you have selected the options for your VL.
Prase share a sample of the data that you want in your value list (both fields). And then show what data actually appears.
Note; if you can get a portal to correctly list the data for your value list, your relationship and context are correct and then it is your value list definition or your data that has a problem. If the portal can't list the data, it's the relationship or possibly the data that's at fault.
Note also that a relationship based CVL is just one of many options for a CVL and there also are alternative methods for selecting values from a list that don't use a value list.
If you search the forum for "Adventures in FileMaking", you'll find download links for a pair of files that explore these options.
Screenshots attached of:
- Data that should appear (showing the min/max fields that should determine the reason to be shown in the VL)
- Data that does appear
I'll certainly look at your Adventures file if this doesn't work out, though I'm interested in the 'why it doesn't work' and where my logical error lies.
The value list shows six entries - those that correspond with a min of 1 and a max of 95. What value have you entered for rx_kcal?
btw, what we do not see is a screenshot of your VL definition. With your setup, the option "Include only related values starting from" should be checked, and the table occurrence IO_n be selected.
You are missing one critical screen shot that I requested: The dialog where you set up the options for the value list. Note that if you use the picture tool in the Reply tool bar, the image is inserted into your reply instead of a link:
This is the dialog that I'd like to see:
This is the dialog, but I didn't upload one that shows the options for a relationship based conditional value list, by the way...
Where is it failing to work?
When I look at the first and second screen shots from Reply #4, I see the correct results for when a value in rx_kcal_pc is somewhere in the 0 to 95 range.
Thus, I don't see anything failing to work here.
It fails to work when either >95-105, >105-110 or >110, the VL is stuck on the list for <95%.
BTW there is another field from the VL table that indicates the above bands and it is correctly registering rx_kcal_pc values within the bands. Hence why I find it so puzzling!
Make sure that you are using fields defined in Manage | Database to be of type number and not text. Otherwise, the inequality operators in use here will not evaluate as you expect because FileMaker is using "text comparison rules" instead of numeric. With text, "1000000000" < "2" is a true statement because the first character of "2" is greater than the first character of "1000000000".
Brilliant. Well you are, not me. I checked other fields but not the min/max; how duff!
1 of 1 people found this helpful
Well, Experienced, would be better than "brilliant" here. FileMaker's "loose" data typing rules make this a pretty common issue that pops up here in the forum in a number of contexts--particularly when comparison operators or when sorting is used and the expected results are not being produced.