2 Replies Latest reply on Mar 3, 2014 7:32 AM by sccardais

    Trouble Clearing Global



      Trouble Clearing Global


           How do I clear the value of a global field in a script?

           I'm using a global field in the header of my layout to Find records.  I also have a button to Show All Records.

           The user types a value into the global field to find a subset of the records. The global field displays the find criteria in the header.

           When the user clicks the Show All button, I want the global field to be blank - or show "All Records".

           So far, I've not been able to clear the value in the global field. This script step is not working. Set Field[Surveys::g_FindEdition=" "] is not working.

           I've tried several variations but cannot get it to work. Set Field[Surveys::gFindEdition;""] is rejected in the Script Editor.

        • 1. Re: Trouble Clearing Global

               Set Field[Surveys::gFindEdition;""]

               Is the correct syntax for clearing the field. But you can't type in the semi-colon.

               When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

          • 2. Re: Trouble Clearing Global

                 Thanks very much. I'm embarrassed to say how long I tried to figure that out.

                 Appreciate your help very much.