2 Replies Latest reply on Apr 4, 2010 5:05 AM by LaRetta_1

    How can I select and deselect records for a certain task?

    hgscn

      Title

      How can I select and deselect records for a certain task?

      Post

      Hello, I often need to print certain records by hand-selecting. I don't need to save the selection but need select certain records, select all records and deselect all records. How could I do this? Thanks in advance!

        • 1. Re: How can I select and deselect records for a certain task?
          davidanders

          You could create a Select01 Field that is a checkbox

          Set Field "Select01" to yes would include that record to that selection set.

          Create as many as you need.

          • 2. Re: How can I select and deselect records for a certain task?
            LaRetta_1

            Instead of flagging a field (which would mean that if you select a record to print then everyone would also get that record when printing), I would suggest writing your select IDs (primary keys) to a multi-line global.  My favorite example is one by Comment (used in Scrolling Checkbox demo some time back), which is:

             

            Freeze Window

            Set Field [  globalTextField ;
            Case (
            IsEmpty ( FilterValues ( Select::ID ; Select::global ) ) ;
            Select::global & ¶ & Select::ID ;
            Substitute ( "§¶" & Select::global & "¶§" ;
            [ ¶ & Select::ID & ¶ ; ¶ ] ;
            [ "§¶" ; "" ] ; [ "¶§" ; "" ] )
            )

            Commit Record/Request

             

            In this way, the ID value of the record you are selecting is surgically removed or added from the list of your own selected IDs and it will not interfer with other Users' selections.  You would then use a relationship from this global to another table occurrence, joining as:

             

            ThisTable::Global = ThisTableCopy::ID

             

            ... then simple Go To Related Record [ Show only related records from table (ThisTableCopy) using current (or another) layout  )  Be sure to check 'match this record only' because, since it is a global, it is same for all records and it will be MUCH faster ...

             

            You can also perform a find using multiple find requests (ask if you'd like to know that method).  I prefer scripting finds over cluttering graph with table occurrences if only used just for jumping around but GTRR is simpler to create.