3 Replies Latest reply on Aug 27, 2010 12:03 PM by Æthernaut

    Paired-down drop-down options

    Æthernaut

      Title

      Paired-down drop-down options

      Post

      Hello Forum,

      I have a programming challenge in which I have a table of people’s initials versus a list of their qualifications.  Then I have a second database that has duties complete with drop-downs of the people’s initials.  Unfortunately, the drop-down shows everybody, when what it really should show is only those individuals who are qualified in that area and aren’t tasked to another duty.

      The bottom line is, I’d like to mull over an example file that successfully demonstrates a similar challenge.  Does anybody have one?

      Thank you in advance for your insight.

        • 1. Re: Paired-down drop-down options
          philmodjunk

          In FileMaker, this is called a "conditional value list". Here's a Knowledge Base article to get you started. If that's insufficient, post back and we'll take it further:  http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list/session/L3NpZC83enlCdXc4aw%3D%3D

          • 2. Re: Paired-down drop-down options
            FentonJones

            http://fentonjones.com/New/Tasks_vs_people.fp7.zip

            This has two things it needs to do. 

            1. Match "qualifications". These must be the same in both Task and People.
            2. Eliminate people already assigned.

            #2 is more difficult. This is known as "dwindling". It needs to assemble a list from all people assigned to ANY task, so it can then omit them. One way is to use an "X" (any, Cartesian) operator, via a self-relationship in Tasks. Another would be to use a Value List of the same, and use ValueListItems (Get(FileName), "value list name") to get them. It may be faster, but you'd need to hard-code the name; which I try to avoid.

            To omit them you use "≠" (does not equal) as the operator. But that needs at least one value to work, so a dummy value is used if the above list is empty.

            It also requires a bit of a "kick upside the head" to refresh the value list. So a script trigger runs to Commit Record, then Refresh [ flush cache join results ].

            Because the Value List may have no values after you choose the person (if there's no one else with matching skills left), a regular "straight" relationship to a table occurrence of People is used to show the name. You'd want it anyway. The choice is a drop-down rather than a popup showing only the name. The drop-down is hidden behind the arrow graphic.

            • 3. Re: Paired-down drop-down options
              Æthernaut

              Thank you.  I get this.  The example, is actually simpler that what I need to do, but it gets me pointed in the right direction for working on it this weekend.  Your the best.