5 Replies Latest reply on Jun 4, 2010 9:22 AM by philmodjunk

    Save Finds

    eibcga

      Title

      Save Finds

      Post

      I frequently use the same criteria in a Found Set of records… so I use Save Find.  I also like to sort the records that appear in the Found Set each time.  In addition to saving finds, is there a way to also save the sort criteria, if any?

       

      For example, under the Records Menu, Save Finds, Save Current Find, Advanced Button, New… or Edit… Button, there is no option to save Sort criteria for the saved Found Set.

       

      Hopefully this option will be added to the next version of FileMaker Pro.

       

      Any ideas for a beginner FMP11 user on Mac OS X v10.6.3?

       

      Thanks.

        • 1. Re: Save Finds
          ryan

          You can create a Script that performs the find and sort for you.

          Are you familiar with Scripting?

          • 2. Re: Save Finds
            eibcga

            I will look into scripts by reading up on that in FMP Help.  I wasn't sure if I was missing something.  Thanks very much for pointing me in the right direction.

            • 3. Re: Save Finds
              ryan

              feel free to post a scenario of the find and sort you need a script to be written for.

              include the field names, etc.

               

              we'll be happy to help!

              • 4. Re: Save Finds
                eibcga

                I have three tables, with relationships, to track financial transactions to track my personal finances:

                 

                (1) Accounts (lists all the accounts or categories), kp_Acct_Name links Ledger table=Account field

                (2) Ledger (a list of all account line items or transactions), kf_Account links Accounts table,=Acct_Name field

                (3) Names (a list of all customers, vendors, etc.), kf_Name links Ledger table=Name field

                 

                Ledger table is a join-table between Accounts and Names.  Accounts table has fields: Acct_name, Acct_type, Acct_ID, and Acct_Subtype.  Names table has fields: Name, Name_ID, Addr1, Addr2, City, Prov, Postal, Phone, Fax, Cell, Email, Country, Website.  Ledger table has fields Account, Trans_ID, Date, Name, Amount, Class, Cleared, Memo, Quantity, Ref_No, Total, Balance, Created_Date, Change_Date

                 

                I have created four (4) scripts, with steps, to give me different "views" of the records in the Ledger table for all records with Account='Bank' or for all records (I have a field called "Cleared" where I enter a date if the record is reconciled, or leave blank if it has not reconciled yet and remains outstanding):

                 

                (1) Journal View = Show All Records, Sort Records by Trans_ID, Go To Record[Last]

                 

                (2) Closed View = Show All Records, Perform Find for Account='Bank' AND Cleared='*', Sort Records by Date and Trans_ID, Go To Record[Last]

                 

                (3) Open View = Show All Records, Perform Find for Account='Bank' AND Cleared='=', Sort Records by Date and Trans_ID

                 

                (4) Ledger View = Show All Records, Perform Find for Account='Bank', Sort Records by Date and Trans_ID

                 

                I (the only user) always works in this DB using Table View.  The Finds above are based on a Saved Find.

                 

                I would like the script to ask me what Account I would like to run the script steps on (and I have the opportunity to specify the account name), then the script will carry on.  For instance, if I wanted to run the "Closed View" script on the Prepaid Expenses account (or any other account that I specify, rather than the Bank account only, without having to make a Saved Find for each account).

                 

                Thank you very much for your help. 

                 

                 

                 

                 

                • 5. Re: Save Finds
                  philmodjunk

                  For "closed" view:

                   

                  Define a global variable, gAccountName

                   

                  Script:

                  Show Custom Dialog ["Please enter an account name" ] //Specify gAccountName is input field #1

                  Enter Find Mode[]

                  Set field  [Your Table::AccountName ; gAccountName ]

                  Set Field [Your Table::Cleared ; "="]

                  Set Error Capture [on]

                  Perform FInd[]

                  Sort [Restore; No dialog]

                   

                  Notes:

                  You can specify the = sign in cleared as part of the Enter Find Mode step if you want, but I prefer Set Field for this as it makes it easier to see the entire list of find criteria in a glance.

                  Set Error Capture keeps the No Record match error dialog from interrupting your script if there are no records for the account name you enter.

                  Show All records in your original script is not needed.

                  A more sophisticated approach can use New Window to pop up a dialog that can make your gAccountName field a drop down list for faster, more accurate data entry.