10 Replies Latest reply on Aug 7, 2013 2:09 PM by SKY

    Simple Q Two. Selecting multiple records?

    VestedInvestor

      Title

      Simple Q Two. Selecting multiple records?

      Post

      If I'm in table view on a database, how can I simply select a range of records (such as, shift-enter on most software) or multiple random records (such as by using ctrl-enter), so that I can, say, delete them all at once?  Seems a like a pretty reasonable request?

      no scripts - just table view of database.

        • 1. Re: Simple Q Two. Selecting multiple records?
          philmodjunk

          Hmmm, can't really, but there are approaches that come close:

          1. Show All records
          2. Press command-T (Mac), Ctrl-T (windows) to omit a single record or use Omit Multiple Records (Ctrl-Shift-T) to omit a contiguous group of records.
          3. After all records have been omitted, select Show Omitted Only.
          4. Now use Delete Found set to delete these records.

           

          Another option is that if your records all have a value in common (or fall in a specific range of values such as serial numbers 235 - 240), You can perform a find for these records and use Delete Found Set to delete them.

          There are other scripted approaches possible and to some degree, their usefulness depends on the design features of your database system.

          • 2. Re: Simple Q Two. Selecting multiple records?
            VestedInvestor

            Thanks, Phil, for the clear answer.

            Frankly, I'm stunned that one can't simply select a range of records. Seems like it should be a standard feature.

            Thanks very much, even I didn't like the answer.

            • 3. Re: Simple Q Two. Selecting multiple records?
              LaRetta_1
              1. Show All records
              2. Press command-T (Mac), Ctrl-T (windows) to omit a single record or use Omit Multiple Records (Ctrl-Shift-T) to omit a contiguous group of records.
              3. After all records have been omitted, select Show Omitted Only.
              4. Now use Delete Found set to delete these records.

              Phil, I would be very careful using this technique.  If this solution is served and other Users add records while you are performing these 1-4 steps then, when you Show Omitted Only, it will include any new records they have added.  You can delete their work. Surprised

              There are three or four ways of replicating this functionality: adding primary key to multiline global and then GTRR, adding primary key to multiline variable then creating multiple find requests, using variable to grab start and then end and using GetNThRecord, using portal.  But it is not native in table view and I agree it should be inherent.

              • 4. Re: Simple Q Two. Selecting multiple records?
                philmodjunk

                A good observation to make LaRetta. Thanks!

                One method I've played with when needing to "select" a contiguous series of records is to use a button with a script that checks to see if the shift key is held down. If it is not, store the current record number in a global variable. If it is, Store the current record number in a different variable, use the original variable to go back to that number and use a loop to "select" records until the record number stored in the second global is reached. Depending on whether I want to perform a find or use Go To Related Record (GTRR), my loop can "select" records by putting them into a list in a global variable (for a find) or a global field ( for GTRR ). Conditional Formats can Highlight the selected records by changing field fill colors if the selected record's primary key is listed in this variable or field.

                • 5. Re: Simple Q Two. Selecting multiple records?
                  LaRetta_1

                  Yeah, I was going to suggest a technique but we don't know the context or User requirements.  If it must be table view then script trigger would be required as regular script won't fire on table view.  Regardless, I didn't feel we had enough information to properly suggest an alternative particularly when the question seemed generic in nature.

                  With all the changes FileMaker has made to enhance the experience for Users in table view and browse mode, I'm surprised that this feature wasn't included.  Truth?  I'm glad it wasn't.  We Developers have enough trouble controlling our Users as it is. Wink

                  • 6. Re: Simple Q Two. Selecting multiple records?
                    philmodjunk

                    Yeah, especially since some bright computer gnome decided we needed to be able to define new fields while in table view....Undecided

                    • 7. Re: Simple Q Two. Selecting multiple records?
                      LaRetta_1

                      Indeed, Phil!!  It is one of my biggest pet peeves!!  There have only been a few times I have allowed Users into table view anyway but it has even bitten ME and I know better!!  I'll say, "HEY!  Who added an empty record in this table?"  Then I view the ModifiedBy and (gulp) it was me. Embarassed

                      • 9. Re: Simple Q Two. Selecting multiple records?
                        Varndawl

                             For anyone reading this post now...the links Michael posted above work AWESOMELY. The only problem is that conditional formatting doesn't work in IWP, so if you need to use that, you'll have to find a work-around to the highlighting.

                        • 10. Re: Simple Q Two. Selecting multiple records?
                          SKY

                               This is a very long time ago, but for anyone new that finds this.  If there is some commonality to the records you want to delete, then it seems that the easiest way to do this would be to:

                               1. show all

                               2. Use find to select the records that you want to be removed

                               3. Go to Records ----> Delete Selected Records.