5 Replies Latest reply on Jul 10, 2012 8:48 PM by JoeStack

    Conditional List Based on Employee Type

    JoeStack

      Title

      Conditional List Based on Employee Type

      Post

      I have a simple table that has the employees name and there job description. Lets consider an order at a restuaraunt. I want to make a pop down list on the order that allows me to select the waiter assigned to that order. So i want it to make a drop down list htat only shows waiters, not bus boys, cooks, dish washers, or managers. How would i do this?

        • 1. Re: Conditional List Based on Employee Type
          philmodjunk

          There are two methods that can do that. The classic conditional value list relies on a relationship. This requires setting up a relationship that only matches to employees of type "waiter". The simpler, "quick fix" approach is to use a calculation field as the source of values for your value list. This calculation would use an If or Case function to return null values for any employee that is not of type waiter.

          The tutorial thread in the following set of links on conditional value lists describes both approaches.

          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: Conditional List Based on Employee Type
            JoeStack

            I may not have been clear, i don't know, but let me try and explain again what i need. First off i understand how to make a conditional list where you have two boxes, one to select employee type you want to add, and then one that allows you to select the employee from the filtered list based on that type select. That is the example most people wanted. I want it where it does not have a box asking for employee type as well. I ahve a page and associated table that is designed specifically for employee entry, this way it is easy to manage them. In this table there is a field for type. Now on a seperate table, say the order table, i want a field where i can add exactly what waiter filled that order. It never changes from waiter to bus boy so there is no reason for a field above to specify employee type i want. I hope that makes more sense. Normally i would just do a work around where there is a field above to sort the list and then an employee field, But this is just an example that i gave that we all can relate to, the databse i am working on needs a simliar concept implemeneted in about 5 spots. I am trying to figure out a intuitive solution so i don't have to have extra mess on the forms. Your help is apprectiated.

             

            Also, i did look over those links, and i have actually looked over them multiple times before, but unfortunatley either i am not seeing how to solve my problem with them or it seems they answer the question with a slight difference that i can't figure out how to work around intelligently.

             

            Thanks so much for the help!

            • 3. Re: Conditional List Based on Employee Type
              GuyStevens

              Philmodjunk's explanation was correct. But maybe you require a little more.

              Take a look at this example file:

              http://dl.dropbox.com/u/18099008/Demo_Files/Waiters_Orders.fp7

              The trick is to make your relationships so that it only allows you to see waiters. (You might need a new Table Occurrence for this)

              You can do this by creating a global field that has the value "Waiter" in it and relate that to the field that contains the Type of contact in the contact table.

              That way, trough this relationship you will only see waiters.

              Base your value list on this Table Occurrence. And make sure that in the settings of your value list you show only related records starting from the orders table (in my example)

              Wow, ok, the explanation might not really help, but the example file might :)

              • 4. Re: Conditional List Based on Employee Type
                philmodjunk

                And option 1 as spelled out in the tutorial could be implemented with this calculation field:

                If ( EmployeeType = "Waiter" ; EmployeeID )

                Then specify this calculation field in your value list setup instead of EmployeeID.

                • 5. Re: Conditional List Based on Employee Type
                  JoeStack

                  Got it makes sense