3 Replies Latest reply on Jan 29, 2016 3:36 AM by paulwatts

    Using global fields for search criteria

    fred@kca-inc.com

      Title

      Using global fields for search criteria

      Post

       So far, I'm having to maintain 2 sets of temporary "state variables".  One in a table of global fields and individual global variables.  The only use for the global variables is for search criteria (Edit Find Request window) in the "Perform Find" script step.  I tried using the global field as the criteria, but got no return set.

      Is there a way to use a global field as the search criteria instead of having to maintain the global state variables?

      Thanks

      Fred

        • 1. Re: Using global fields for search criteria
          philmodjunk

          Do it all the time. It was our only practical option until they added the option for including a variable name reference in the stored find request.

          Enter find Mode []
          Set field [Yourtable::NameField ; GlobalFieldsTable::SpecifiedNameField ]
          Set Error Capture [on]
          Perform Find []

           

          If you enter "Phil" into the global specifiedNameField, the script should find all records that contain "Phil" in the YOurtable::Namefield.

          Please note that this script fails unless you have opened up field optiosn for SpecifiedNameFIeld and selected the Global Storage field option.

          • 2. Re: Using global fields for search criteria
            fred@kca-inc.com

             Thanks.  That seems to work great.  Now I can get rid of a bunch of global variables.

            • 3. Re: Using global fields for search criteria
              paulwatts

              I hope you guys are still around .....

              How does your "Table of global fields work"?

               

              I have tried using a global field in the table I want to search. This works well in some cases but not in others. In the latter cases, the user gets a "You don't have permission..." message - is the user prevented from entering the global field value (using a drop-down value list) because someone else has already opened a layout based on the relevant table?.

               

              Do you know if there is a simple general solution for the case where the user enters the Find criteria using a drop-down value list (or drop-down calendars for date range) and a script does the search? FM seems to think that another window has to be opened - this sounds heavy duty to me.

               

              Paul