10 Replies Latest reply on Jul 27, 2015 10:26 AM by Markus Schneider

    Multiple record selection

    KylePutzier

      Many applications allow for Command clicking on a list item to select or de-select it. They also allow for a range selection by holding down the Shift key.

      My Filemaker solution does this also. It doesn't seem as efficient as it could be though.

      How do you do it?

        • 1. Re: Multiple record selection
          Markus Schneider

          FIleMaker is different..

          WE are using an extra field with a checkbox, a click on that field toggles the checkbox (not ctrl-click, not shift-click).

          If You want a list with selected records, You can open a new window (gtrr, find, whatever). We use this i.e. for selecting items for sale - the selected articles were transferred to the items-table of an invoice via loop

          • 2. Re: Multiple record selection
            Fred(CH)

            I recently posted a Feature Request to have this natively in a future release.

            And you ?

            • 3. Re: Multiple record selection
              beverly

              I like to use a "set field" (usually a global field). Click once and add the recordID (whatever you are using for a primarykey in that table). Follow it with a return - Char(13). Click again and remove the recordID (plus return) from the "list"). So there is a 'toggle' to the button on every record.

               

              1. you can then use the "list" to highlight what's selected (change the color of the button, perhaps?)

              2. you can also use the "list" for your GTRR (as it's global field and only those values match.

              3. this list can be used however might be needed (ExecuteSQL, ??)

               

              The advantage of a global is also in mult-user environments. Each person's global is unique. The checkbox approach is a field that everyone would see and get the same results.

               

              beverly

              • 4. Re: Multiple record selection
                Mike_Mitchell

                +1 to Beverly's suggestion. You can use a custom function like this one:

                 

                FileMaker Custom Function:AddRemoveListItem ( theList ; value )

                 

                to simplify the management of the list.

                 

                The adding or removing of a range is a little different (which was the OP's question). That involves keeping track of the last record added (probably through Get ( RecordNumber)), looking for a modifier key (such as Shift), and then performing an add or remove operation over all the records in between, based on whether the first record was selected or de-selected. A bit more complicated, but doable.

                • 5. Re: Multiple record selection
                  beverly

                  Right! a "range" is certainly different. There IS the ability to capture the Shift Key: Get(ActiveModifierKeys). The ability to capture the start and end of the range may need to be scripted, not simply using a custom function on a single set field button. 'complicated, but doable' +1, Mike!

                   

                  beverly

                   

                  On Jul 25, 2015, at 7:54 AM, Mike_Mitchell wrote in whole or in part

                   

                  The adding or removing of a range is a little different (which was the OP's question). That involves keeping track of the last record added (probably through Get ( RecordNumber)), looking for a modifier key (such as Shift), and then performing an add or remove operation over all the records in between, based on whether the first record was selected or de-selected. A bit more complicated, but doable.

                   

                  • 6. Re: Multiple record selection
                    Fred(CH)

                    +1 to Bev and Mike, and keep in mind that user can open multiple window. It would be strange to modify a "highlighted set" in window #1 and see the same modification in window #2.

                     

                    With a variable you can index value based on a window using a calculated repetition number : Code ( Get ( WindowName ) ). I think you might have to index by window and by table.

                     

                    But all that is a bit painful IMHO. It is the reason why i posted that one.

                    • 7. Re: Multiple record selection
                      user19752

                      Thanks yous.

                       

                      I think use of selected records need GTRR in most cases, so the "list" should be in field, not variable the time.

                       

                      New window made by hand have automatic suffix number in name, but not by script, good and bad.

                       

                      I implemented 1st Bev's reply on FM6, there was a pain that text field have only 32000 chars and record id inclease not sequential so reach large number very fast. Haha, no more any useful information

                      • 8. Re: Multiple record selection
                        HammerOz

                        In the FileMaker advanced training files (13) the fts meeting solution file has a picker list method using conditional formatting, counters etc to add people to a meeting. So you click you people and the row highlights then you click add. this was a good steep learning method for me a year or so back.

                        • 9. Re: Multiple record selection
                          KylePutzier

                          This is what I'm currently doing. It just doesn't seem as smooth and refined as it should be.

                          Screen Shot 2015-07-27 at 7.32.12 AM.png

                           

                          • 10. Re: Multiple record selection
                            Markus Schneider

                            Yes - without a global, it's only for single-user )-:

                            Drawback of the global-method is, that one loses the selection after a restart (for whatever reason). If this matters, we use a helper table, entries for individual users, scripted.