4 Replies Latest reply on Dec 2, 2013 4:16 PM by john.s

    Help with Relationships



      Help with Relationships


      I have a customer table that contains a customer type field (ie school, corporation, person) when creating a job I want to only return a list of customers with a type that is appropriate for that type of job, i.e. if it is a portrait job I want to bring up a pop up with only customer type of “person” for Yearbook jobs only “Schools” etc.  I have the Schools portion working but can’t figure out why the other job types always bring up the entire customer table.  Here’s the relationship diagram I know something is wrong but can’t figure out what.


        • 1. Re: Help with Relationships

               Do you need a list of records or a list of values in a value list?


          I have the Schools portion working but can’t figure out why the other job types always bring up the entire customer table.

               Please describe in more detail how you have set this up so that the "schools portion is working".

          • 2. Re: Help with Relationships

                 I have a "Main Screen" with buttons that run scripts for each type of job that can be created.  When the Job is created it also Creates a Folder on the Desktop with the Job Name.  The format of the Job Name is unique for each type of Job.  For example a Sports Action Job for HighSchool Yearbook would create a Folder with a  JobTitle of YB_20131202_Football_NewHighSchool_vs_OldHighschool  A portrait Job would Create a Job Name and Folder as POR_20131202_Smith_Family. The photographer than loads the images from that photo shoot into that folder for further processing. There are about eight different types of Jobs.  When the button to create a Portrait Job is pressed the following Scripts is run

            New Window [Name: “Create Portrait Job”; Height: 525; Width: 650; Top: 50; Left: 50; Style: Dialog]

            Go to Layout [“Create Portrait Job” (Jobs)

            Show/Hide Toolbars [Hide]

            New Record/Request

            Set Field [Jobs::_fk_JobTypeID; 5]

            Set Field [Jobs::_fk_CustomerTypeID; 1]


                 On the layout the Photographer Enters a few fields of information...most are pop up menus.  I want the pop up for Customer to only bring up customer types of 1 which is the key for customers that are people.


                 I think the Schools Pop up is working because I'm pulling information from the Schools table not the Customer Table.


                 I hope this helps...if not let me know and I'll try again.





            • 3. Re: Help with Relationships

                   This didn't fully answer all my questions. The key missing detail: "Are you trying to pull up a set of records for a specified job type or are you trying to create a value list where the values listed are only for a job type selected in a different field?

                   I think that you are trying to do the latter--which is referred to as a conditional value list where you select a job type in in one field and then a value list in another field only lists values consistent with that job type.

                   If so, here's my collection of links on the subject:

                   There's a lot of overlap between the first two links 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.

                   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.

              • 4. Re: Help with Relationships

                     I am trying to bring up a conditional value list...it just is not working like I thought it would.  Thanks for the references I'll read through them and see if I can figure out what i have done wrong.