3 Replies Latest reply on May 4, 2010 5:20 PM by lushmind

    Conditional value list 4 deep.



      Conditional value list 4 deep.




      I am running FMP 11 Advanced on a Mac with aspirations for IWP.


      How would I do nested conditional values 4 deep?


      The fields I have are as follows: prgm_Location, prgm_Date_Begin, prgm_Date_End, and prgm_Accommodation and these are in table called "Programs".


      The other table is "Registrants", with the same fields plus Registrant_ID and Registrant_Name. The user is to start in the Registrants table by chosing a location, and then in the next field would be displayed the beginning dates that apply to only that location, the user makes a choice, and then moves on to end dates that apply, and then finally to the accommodation of choice that pertains only to that particular location, start date, and end date.


      The kicker here is that I can get all the options for each field to appear in a field (ie. all the start dates for a given location), but I want the conditional options to be matched to one record in the Programs table. An example: Once the location is chosen (ie. Madison), there are the possibility of these start dates: 6/6, 7/11, 7/25, and 8/6. The possible end dates are 6/18, 7/23, 8/6, and 8/20. Let's say I chose a start date of 7/25. As I currently have it, all the possible end dates appear after I chose 7/25, including dates prior to the program even beginning - 6/18 and 7/23 ideally would not be appearing - that is my goal.


      I currently have a table called "Registrants" and a table called "Programs" with this relationship: Registrants :: prgm_Location = Programs :: prgm_Location. And my value lists are as follows:


      Registrants :: prgm_Location has a value list of programs :: program_Location.

      Registrants :: prgm_Date_Begin has a value list of programs :: program_Date_Begin (related values only).

      Registrants :: prgm_Date_End has a value list of programs :: program_Date_End (related values only)

      Registrants :: prgm_Accommodation has a value list of programs :: program_Accommodation (related values only)


      Assistance would be awesome and counts towards karma scores.


      Thank you.



        • 1. Re: Conditional value list 4 deep.

          Do you know how to set up a basic conditional value list between just two fields?


          If not, then here's a thread on setting up conditional value lists:

          Custom Value List?


          You can simply extend the concept for option 2 to have a series of value lists that are progressively narrowed as the user selects values. To do that, you need a series of relationships in order for each subsequent conditional value list to work correctly.

          • 2. Re: Conditional value list 4 deep.



            I know how to set up the basic conditional list. That is no problem. At this point, I can choose the prgm_Location, and the appropriate date_Begin options appear (these are all the possible begin dates for that given location), which makes sense. What I get stuck on is once I have a prgm_Location chosen and a date_Begin chosen, the next list I get again shows all the possible end dates for that given location...even end dates that occur before the chosen date_Begin.


            I have the program information in a TO called "Programs". If I am understanding what you are saying, I need to make more TOs of "Programs" and relate them to the "Registrants" TO, correct? I feel like I have tried this a lot of times with no success.


            The two models I can think of are these:



            Registrants :: prgm_Location = Programs :: prgm_Location


            Programs :: prgm_Location = Programs2 :: prgm_Location AND Programs :: date_Begin = Programs2 :: date_Begin


            Programs2 :: prgm_Location = Programs3 :: prgm_Location AND Programs2 :: date_Begin = Programs3 :: date_Begin AND Programs2 :: date_End = Programs3 :: date_End



            Registrants :: prgm_Location = Programs :: prgm_Location


            Registrants :: prgm_Location = Programs2 :: prgm_Location AND Registrants :: date_Begin = Programs2 :: date_Begin


            Registrants :: prgm_Location = Programs3 :: prgm_Location AND Registrants :: date_Begin = Programs3 :: date_Begin AND Registrants :: date_End = Programs3 :: date_End


            It seems to me you are suggesting the first model in series versus the second model with is in parallel...which would make sense as I want things to narrow down serially.


            Do I need to have a relationship between the Program_IDs at all?


            Thank you for your help.



            • 3. Re: Conditional value list 4 deep.

              Phil, solved the problem. Thanks. For anyone else reading this, it was model 2 from above. The relationships of the "Programs" need to be built in parallel to the "Registrants" TO, with each getting progressively more narrowly defined, and then one just has to reference each "Programs" TO in serial order starting with the values in the "Registrants" TO. I.e 1st "Programs" TO has 1 relationship to the "Registrants" TO, the next occurance has two relationships, etc.