4 Replies Latest reply on Jun 30, 2014 12:26 PM by Rcannon95

    Help with Quick Find Script

    Rcannon95

      Title

      Help with Quick Find Script

      Post

           I am trying to do a quick find script that only shows records where the Company Field Matches the CompanySort Field, which is a global variable, preferably with only that exact match. Both fields are text fields. I am also having this problem with finding records between two dates, which are also global variables. It says "No Records Match This Find Criteria". I have the drop down for CompanySort populated by all the values for the Company field. Date, Start Date, and End Date are all set to be Date Fields.

           None of these Company searches work.

            

           The second one for the Company,  "Exact ( Budget::Company ; Budget::CompanySort )" will pull up records, but they are completely wrong and the same 11 records each time. I filtered by company ABC

           Thanks for all your help.

            

        • 1. Re: Help with Quick Find Script
          SteveMartino

               Being they are global fields, instead of Perform Quick Find, have you considered a second table occurance with a self join.

                           Budget                                Budget2

                            __fkID                         =  __fkID

               AND    gStartDate                 <=  BudgetDate

               AND    gEndDate                   >=  BudgetDate 

                

               Also you can use a script that will enter find mode after the start and end dates are set and set the budget date field like this:

               Enter Find Mode []

               edit:  I also noticed you are perfoming a find, of a quick find result (the quick find result has the wrong syntax)

               Set Field [Budget::Date; Budget::Start Date & "..." & Budget::End Date]

               Perform Find []

               You can further modify the script to handle if the start date is empty, use all records up to end date, and if end date is empty, use from start date to today's date

          • 2. Re: Help with Quick Find Script
            Rcannon95

                 Is there any way to do the quickfinds without a second table?

                 What do you mean by "I also noticed you are perfoming a find, of a quick find result (the quick find result has the wrong syntax)", what are you referring to?

                 Do you have any ideas on how to fix the company quick find?

            • 3. Re: Help with Quick Find Script
              philmodjunk

                   Hmmm, the script you show has every single script step disabled so that they will not execute when the script is performed....???

                   For scripted find examples, you might find this thread helpful: Scripted Find Examples

                   Please note that these are Finds, not quick finds. I rarely find scripting a quick find a good option to use due to the way I usually need my finds to work--I rarely want the criteria specified to be used to match values in more than one field.

              • 4. Re: Help with Quick Find Script
                Rcannon95

                     Thank you. Those were disabled so I had a record of what I tried. I fixed it using a similar way to what you posted.