3 Replies Latest reply on Jun 20, 2012 5:32 AM by philmodjunk

    Auto choice of value list



      Auto choice of value list


      I'm trying to have Filemaker display a different value list depending on the entry in a previous field.  So if the user identifies a particular drug, the "injury" field (next field entered) displays a list of possible injuries.  Each drug has different injuries associated with its use.  I can't figure out how to do this.  HELP?!?!

        • 1. Re: Auto choice of value list

          What you describe is called a conditional value list. It's one value list, but subsets of the total list of values appear in the list depending on a "category" choice made in another field.

          Here are some links on conditional value lists:

          Forum Tutorial: Custom Value List?

          Knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list

          Demo File: https://www.dropbox.com/s/j6qf0z9fnem3uxd/ConditionalValueListDemo.fp7

          Hierarchical Conditional Value lists: Conditional Value List Question

          Feel free to post follow up questions here if those links aren't enough to get your value lists working correctly.

          • 2. Re: Auto choice of value list

            OK, so I created a separate database with two tables and two layouts.  I am able to create records in the second table that identifies a drug and the injuries it can cause.  Those two fields make up one layout.  In another layout I show the related fields from the first table, which also identifies the client who took the drug.  It works exactly as I wished.  In the main layout, I can create a new client, choose the drug from a Pop-up menu and use check boxes in the last field to identify the actual injuries from the list of injuries associated with that drug.


            I can't seem to bring that functionality into my actual database.  I can replicate what I did, but then each drug/injury entry is a new record.  That's not good because each record is a case in the office.  When I create a record to enter drug/injury combination data, it creates a new blank case.  I tried to have my value list pick up the information from the second database, but it only seems to be able to pick up the drug list, I can't seem to figure out how to bring in the injury list associated with that drug.

            Any suggestions?

            • 3. Re: Auto choice of value list

              We'll need to attack this step by step.

              Step 1:

              You have two tables related like this? (names may differ)

              MainTable::Drug = Injuries::Drug

              If so, can you place a portal to Injuries on your MainTable layout, select a drug and see the correct list of injuries in the portal?

              The portal won't be needed to get this to work, but it's a good way to confirm that data and relationship are working correctly for use in the conditional value list.

              Here are several ways you can set up the Injuries table:

              1. One Record for each Drug-Injury Pairing
                A single record might look like: Drug: Ibuprofen    Injury:Sprains

              2. One Record for each Drug, Value list for injuries
                A single record might look like Drug: Ibuprofen    Injury: Sprains¶Contusions¶etc...   (¶ is the return character)

              3. One Record for each injury. Value list for drugs
                A single record might look like Drug: Ibuprofen¶Acetominophen¶Asprin   Injury: Sprains

              4. One Record for a group of drugs with a group of common injuries.
                A single record has lists of values in both fields. The same drug and the same injury can be listed in multiple records


              All of these methods work in terms of producing the same conditional value list from the same relationship, but data entry and layout design for managing it will vary for each method. A checkbox set is a simple way to create and edit return separated lists of values in some situations.