4 Replies Latest reply on Mar 6, 2015 12:30 PM by YilbberVargas

    Need help with filtered Fields

    YilbberVargas

      Title

      Need help with filtered Fields

      Post

      Hello all, I am having trouble getting filemaker to behave regarding filtered Texts.

      I have 4 Fields

      EmployeePositions LEAD Staff and Driver

      Lead is supposed to return "A1 Lead" when ever it lists A1, in the Employee position field.

      It often comes in many flavors, such as "Staff A1, A1 A2, A1 Lead, L1 A1.

       I tried earlier, and it worked. but when i added some more filtered texts the function broke

      when i tried to include STAFF, DRIVER fields in their own fields.

      I am at a loss to fix this and do not want to resort to macros when a if statement should work.

       

      In a related question,

      I have a field in another table named LEADS and it should ONLY list all the employees who have A1 LEAD in the LEAD in the LABOR table. I've already created a linked-reference table named Leads to filter out these leads, but for some reason, when i use the sort only from the table option, It shows NO fields.

      How do i set this up properly. Does it need more data?- My employees are mostly referred to by their initials.

       

       

      in an unrelated question, I know that there are Global variables. What kinds of Data should be global?

      I am thinking things that are static, like Holidays, Overtime Calculation fields, and Yearly reports. Is there any other instance in typical project schedule "solutions" that need variables?

       

        • 1. Re: Need help with filtered Fields
          philmodjunk

          Ummm, how's that again?

          Sorry, but there is just so much missing from your description of what you have set up and what you want it to do. I suggest that you try again and provide quite a bit more detail about you fields, records and relationships so that we have a better chance and figuring out how to help you.

          About global variables...

          Global variables are, well global. A value assigned to them will be accessible from any layout, script step or calculation in your file. That also means that the value is not specific to any record of any table of your database.

          Global variables are specific to a given user. If you host your database so that multiple users can access the database at the same time, the values assigned to a variable during one user's session will be not be accessible to other users.

          Global variables are ephemeral. They only exist as long as the user keeps the file where they were created by assigning a value to them open. Once the file is closed, the variable and its data is gone.

          Global variables cannot be directly edited by the user. You can only assign values to variables using either the set variable script step or the Let function inside a calculation. If you need to put a box on the layout where the user enters data that then needs to be global, use a global field instead of a global variable.

          If it turns out that you need to use a global field, see: http://help.filemaker.com/app/answers/detail/a_id/3604/kw/global

          Caulkins Consulting, Home of Adventures In FileMaking

          • 2. Re: Need help with filtered Fields
            YilbberVargas

            I want to use LEAD, Staff, Driver as a filter for an employee table, where the positions they have are chosen by their active status (which has active, inactive, Unknown)

            Originally i used an if(filter(employeePosition;"A1");"A1 Lead";" "

            it worked at first, but the code failed to work in Driver and Staff Fields.

             

            • 3. Re: Need help with filtered Fields
              philmodjunk

              Sorry, still not enough info. There are multiple you might set up a "filter for an employee table", this could be a portal filter, a find, a conditional value list....

              Ad it's not clear what data is actually in the position field for different records in your table.

              best guess is that you should be using PatternCount instead of filter. I suggest looking both functions up in help.

              • 4. Re: Need help with filtered Fields
                YilbberVargas

                Thanks for leading me in the right direction. I will get back to you if I find Success.