5 Replies Latest reply on Aug 6, 2016 12:04 AM by Johan Hedman

    Quick Find with Variable


      I am trying to script a quick find using a variable set on a value in a related table - it returns all records, doesn't seem to accept the variable (neither local nor global)

        • 1. Re: Quick Find with Variable

          Note that when performing a find on a field from a related table it will return any records that have at least one related record with the matching value. However, the returned records will still have their full complement of related records. The find identifies which of the primary records are returned, but it doesn't limit which related records related to the primary records are returned. (For example in a typical invoice / line item situation, if I'm on the invoice layout and search for a specific product in the line item, it will return any invoice where that product was a line item. However, it will show all line items for all invoices. The search identifies which invoices to show, not which line items to show under the invoice.)



          Can you give more information on what you are trying to do? What are the fields and relationships? What script steps are you using?

          • 2. Re: Quick Find with Variable

            I believe Quick find only works on the layout you're on.

            • 3. Re: Quick Find with Variable

              What I am attempting, and I am a novice, is to search my main table, using Quick Find as it is not limited to any particular field - the data I am searching for could be in any number of text fields.  To do this I have implemented a Pop Up, where I have an input field and the button which will call the script.  I am using the Pop Up for some other searches (using Enter Find Mode and Perform Find), but to achieve the blunt, multi-field search I am attempting to do this with Quick Find that is where I am struggling.


              The field in the Pop Up for the search criteria to entered is coming from another, related table which has but one record.  (relationship is x) My purpose in doing it in this somewhat byzantine manner is:  using Set Field to enter the search criteria I have found that the search criteria I enter gets added to whatever record has the focus... So a search for a 'due date' will return, for example, five valid records, plus the record that was on screen at the time (hence Get(FoundCount) returns 6).  I'm trying to avoid adding junk data to my table.


              I thought, I would put the search criteria in a field in this other table and wiping the field when I'm done.  But, alas, Quick Find, well, doesn't find - or I more accurately displays all records as a result of its efforts.  It is as if the variable I've set from the other table has a value is null.  Using Set Custom Dialog, I can see that the intended value is indeed in the variable - it has successfully been written into the variable, but Quick Find, it seems, can't see it.


              Thank you for any assistance you can render.

              • 4. Re: Quick Find with Variable

                Could you please indicate which script steps you are using?


                Normally to perform a quick find through a script you use: Perform Quick Find.


                You mention using Set Field, but that shouldn't be necessary. You also mention using a variable, but that also doesn't match with the use of Set Field.

                • 5. Re: Quick Find with Variable
                  Johan Hedman

                  You can use text you have in the Quickfind search field and take that information to any other layout, do your search and show it in a third layout (all have to be same Table occurrence)