6 Replies Latest reply on Jun 25, 2015 7:54 AM by philmodjunk

    omit from found set script

    DennisHocker

      Title

      omit from found set script

      Post

      Starting with a found set is it possible to write a script to perform a find and then have that found set omitted from the original found set

        • 1. Re: omit from found set script
          TKnTexas

          Yes.  Do it all the time.

          • 2. Re: omit from found set script
            philmodjunk

            Enter find mode.

            Specify your search criteria

            Then, instead of perform find, pull down the Requests Menu and select "Constrain Found Set"

            This process can also be scripted.

            • 3. Re: omit from found set script
              DennisHocker

              Phil: Thank you for your response. Have used constrain found set in scripts. Did not know about being able to omit. Trying to make this work script I have is Enter find mode, Set field to identify search criteria, Constrain found set (Restore). When script runs I get the message "The provided find criteria is not valid. Enter valid request before proceeding." If I click on modify and enter the search criteria in the field and click continue that criteria is then omitted from the found set. What do I need to do to get the script to work.

              • 4. Re: omit from found set script
                philmodjunk

                Hard to say without seeing an actual copy of your script.

                I never use [Restore] with enter find mode, perform find, constrain found set and extend found set.

                I always have my script enter find mode and then use set field, new record/request, and omit records to set up the needed find requests.

                And instead of constraining on an omit request, you can just include the omit request as part of the find. It's set up to omit on the found set produced by the preceding requests anyway--that's why Omit requests should come last.

                Or you use constrain, but reverse the logic of your find to get the same result as your omit request.

                • 5. Re: omit from found set script
                  DennisHocker

                  Can't quite follow. I believe I've get the first three script steps 1) Enter Find Mode  2) Set field  3) New Record/Request from here I am not sure

                  • 6. Re: omit from found set script
                    philmodjunk

                    Here is a thread of multiple scripted find examples that you can refer to: Scripted Find Examples

                    To post a script to the forum:

                           
                    1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
                    2.      
                    3. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
                    4.      
                    5. If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                    6.      
                    7. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.