2 Replies Latest reply on Jun 19, 2014 1:19 PM by Jrow

    Combining a Custom Dialog Box with a Perform Find script

    HowardRathbun

      Title

      Combining a Custom Dialog Box with a Perform Find script

      Post

      I want to allow a user to enter some text which will be used by a Find script to locate a record which contains a field that matches that text.  I tried to use a Perform Find with a local variable (via Get Variable) but when I specify the field to be searched, the data in that field gets  CHANGED.  I tried to use the Custom Dialog Box, but I can't figure out how to enter text which can be used as the search criteria for a Find command.  What ever I do ends up changing the field.  I DONT want to do data entry, I want to FIND a specific record based on a variable that the user enters.

      If I can do that, then of course, I'll have to take care of the case in which the entered text is not found in any records.

      Any help or insight will be greatly appreciated.

        • 1. Re: Combining a Custom Dialog Box with a Perform Find script
          philmodjunk

          If a local field is being changed then you are still in browse mode when you should be in Find mode. Also, a global field will work better for what you want here.

          Define a new global field, gFindCriteria. To define a global field, define it in Manage | Database | Fields and then click the options button or double click the field defintion to bring up field options. Click storage tab and choose the global storage option.

          Now the script:

          Show Custom Dialog ["Enter data..." ] //Specify Input field1 for gFindCriteria
          Enter Find Mode[]
          Set Field [YourTable::YourField ; YourTable::gFindCriteria ]
          Set Error capture [on]
          Perform Find []

          • 2. Re: Combining a Custom Dialog Box with a Perform Find script
            Jrow

                 This is very helpful! I have a script that has two parts. The first is similar to above where the user inputs a report number and the related records are shown. For the second step, I want to find related records that are < the report number the user input. Is there a way to do this? Thanks!