10 Replies Latest reply on Apr 30, 2013 8:54 AM by philmodjunk

    Simple Conditional Value List

    MichaelConti

      Title

      Simple Conditional Value List

      Post


           If there is a solution to my issue = can someone point me in the right direction or give me an easy explanation on how to achieve the following:

            

           So lets say we have a database for appliances, which contain fields such as:  category, description, image, cost, model, etc...

           Now in the layout - lets say customer selection.   We have a field "Appliance_Fridge" linked to the above.  How can the list of appliances that are listed , ovens, microwaves, stoves, etc... be cut down to just the Refrigerators?   Without first having to select the category - this is in it's own area and only Fridges will be selected there.

            

           Hope that makes some since- I am new to this and hoping someone will have the patience to assist.

            

           TIA!

           Mike

        • 1. Re: Simple Conditional Value List
          philmodjunk

               Use a calculation field in place of the user selected field to "hard wire" the conditional value list to refrigerators.

               LayoutsTable::constFridge = Appliances::Category

               Define constFrige as a calculation field that has a single term, a quoted text string for its calculation such as: "Refrigerator".

               Now you have the same relationship setup for a conditional value list where the user picks the category, but the constFridge field takes the place of the user modifiable category field.

          • 2. Re: Simple Conditional Value List
            MichaelConti
                                

                                     Use a calculation field in place of the user selected field to "hard wire" the conditional value list to refrigerators.

                                

                                     LayoutsTable::constFridge = Appliances::Category

                                

                                     Define constFrige as a calculation field that has a single term, a quoted text string for its calculation such as: "Refrigerator".

                                

                                     Now you have the same relationship setup for a conditional value list where the user picks the category, but the constFridge field takes the place of the user modifiable category field.

                           

                  

                 When I create a new record - it stops working - how can I force the calculation?   I am still nto sure I have the fields set up correctly.

            • 3. Re: Simple Conditional Value List
              philmodjunk

                   If constFridge is a calculation field, not text, it should automatically work in a new record.

              • 4. Re: Simple Conditional Value List
                MichaelConti

                     it is setup as a calcualtion filed.   The fileds seems to be correct but I think my issue is with the value list.

                     To help clarify I have a table, Client Selections.  Then I have two Table occurances of Appliances - one for Category and one for Selection

                     The value list is then created from those two - The Category TO is linked to the Const_xx filed.  The value list is where I think the issue is.

                     The first field (created from specified field) is what - I think tihs is where my issue is.

                      

                     Thanks soooo much for your help! 

                • 5. Re: Simple Conditional Value List
                  philmodjunk

                       If the user isn't going to select the category, why do you need a TO for it?

                       If you have this relationship:

                       ClientSelections-----<Appliances|Fridge

                       ClientSelections::constFridge = Appliances|Fridge::Category

                       Then your value list should be set up to list values from Appliances|Fridge, with "include only related values, starting from ClientSelections", specified.

                       If you set up your value list to list values from a different TO of appliances, this won't work.

                  • 6. Re: Simple Conditional Value List
                    MichaelConti
                         

                               

                                        If the user isn't going to select the category, why do you need a TO for it?

                                        If you have this relationship:

                                        ClientSelections-----<Appliances|Fridge

                                        ClientSelections::constFridge = Appliances|Fridge::Category

                                        Then your value list should be set up to list values from Appliances|Fridge, with "include only related values, starting from ClientSelections", specified.

                                        If you set up your value list to list values from a different TO of appliances, this won't work.

                                         

                                        I guess I just am not grapsing what you are tellnig me.   I tried several combinations, but have yet to be successful in making it work like I am expecting it to work.   Thanks anyway for your help.

                          

                    • 7. Re: Simple Conditional Value List
                      philmodjunk

                           What version of FileMaker are you using? I can share a very simple demo file that illustrates this concept, but would like to share it in the version that you are using.

                      • 8. Re: Simple Conditional Value List
                        MichaelConti

                             Version 12 pro advanced.

                              

                             Ok, I have it working with a second TO.   I would likk to see what you suggest to see your version.

                             Thanks,

                             Mike

                        • 9. Re: Simple Conditional Value List
                          philmodjunk

                               I recommend that you click the edit link for your last post and remove the email address. There are folks that use software to "scrape" email addresses from forums like this so publicly posting your email address can result in a lot of spam.

                               I'll post a download link here in a few minutes.

                          • 10. Re: Simple Conditional Value List
                            philmodjunk

                                 See this link to download the demo.

                            https://dl.dropboxusercontent.com/u/78737945/HardwiredCondValueListDemo.fmp12

                                 It illustrates two ways to get what you have requested. The upper copy of the drop down list field is set up with the method we have discussed here. The lower copy of the same field is set up with a value list that does not require a relationship, only a calculation field in the table that serves as a source of values for the value list.

                                 Both methods are discussed here: Forum Tutorial: Custom Value List?

                                 Here are some other links on conditional value lists:

                                 There's a lot of overlap between the tutorial and the knowledgebase article so you can read one and skim the other. The demo file gives you several examples of different conditional value lists so you can examine them to see how they are set up. If you are using FileMaker 12, you can open this demo file from your File menu to get a converted copy of the demo file that you can examine in FileMaker 12.

                                 The last link discusses how to set up a chain of conditional value lists where the value selected in each conditional value list controls the values listed in the next 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