5 Replies Latest reply on Feb 22, 2017 8:04 PM by philmodjunk

    I am having trouble with finding unique values

    stanschoonover

      When I do a find for a value, multiple returns that contain that value are appearing.

      I've tried =, ==, "",. etc. but can't get a unique value.

      So, East Smith High School returns values for East Smith and Smith High Schools.

      How can I limit the find to exactly the school that is selected from my pop-up menu of schools?

        • 1. Re: I am having trouble with finding unique values
          coherentkris

          if you go into find mode, set school name field (guessing thats the name) ==East Smith High School and perform find your found set will be 0 or more records where school name contains exactly East Smith High School

          Refining find requests in FileMaker Pro using find operators | FileMaker

          • 2. Re: I am having trouble with finding unique values
            stanschoonover

            OK. If the procedure involves using a pop-up list of school names, and one is chosen, how can you limit the results to just that one school, and not other that happen to have some name in common?

             

            i.e.- pop-up menu for choosing a school has both Smith and East Smith HS as values.

            When I choose Smith High School, both Smith and East Smith are returned.

             

            I've tried to limit the find by using == in the find critieria, and then no records come back, for any school.

            The script steps are 1. enter find mode [pause]  2, choose the school name from the pop-up list  and, 3. perform find. When I choose Smith High School from the pop-up list of schools, both East Smith and Smith are found.

            I am trying to allow users to choose a unique school value from the pop-up, and then proceed to other actions.

            • 3. Re: I am having trouble with finding unique values
              philmodjunk

              You may need to share your script as all it takes is one little detail wrong.

               

              You might also compare your approach to the scripted find examples found here:\

              Scripted Find Examples

               

              And assigning each school a unique ID either a serial number or UUID has advantages too. The popup menu can look the same as it does now, but it can be set to enter the ID while showing the name.

              • 4. Re: I am having trouble with finding unique values
                stanschoonover

                Hello!!  You have been very helpful to me in the past, and I appreciate your time and expertise.

                 

                Each school has a unique id number in the data. I'm using that after I find the school.

                 

                Director Registration Step1.5 [script]

                Go to Field [School]

                Enter fine Mode [Restore; Pause Off]

                -- this is where the pop-up menu is used to choose a school

                then,

                Director Registration Step 2

                Perform find

                Enter Browse Mode

                Sort Records

                Go to Record [First]

                Go to Field [id]

                Copy [id]

                Enter Find Mode[Pause]

                Paste [Select; id]

                Perform find

                Go to layout [original]

                Constrain Found Set [no criteria]- I assume this allows only one id

                 

                If I can somehow use the school AND the id in the find, [remember that the find is accomplished via a pop-up menu that has all the school names found in the table], that would be ideal.

                • 5. Re: I am having trouble with finding unique values
                  philmodjunk

                  I don't understand the purpose of finding a record by name, copying the ID and finding again. No where in this script do you use the "==" operator in your find.

                   

                  I suggest taking a look at the scripted find examples that I recommended earlier.