3 Replies Latest reply on Oct 15, 2012 11:25 AM by comment

    Selecting more than one record in a portal




      Is there an easy way to select more than one record in a portal to be the subject of an action?


      I want to group one or more simple entities together by selecting the records I want to group and then and then running a script which will add their primary key values to a table with a new key value identifying the group to which they all belong:


      GroupID SimpleID

      27 14

      27 98

      27 105


      Ordinarily I'd expect to hold down the Shift or Ctrl key and click on the records I want to select, but FP12 doesn't seem to support this in a portal.




      Ian Skidmore

        • 1. Re: Selecting more than one record in a portal

          This is one of the (many) areas in FileMaker where a relatively complex workaround is reqruied.


          Easy way - put a checkbox on the portal row, check the records requried and then run a script that isolates the reocrds, performs your actions and then clears the checkbox.


          More complex way - checkbox is not visible, check for clicks/shift-clicks on portal rows (which is a button), set the flag field via a script on the button and then continue as in the "easy" way. Bonus points - add conditional formatting to display the fact that the portal row has been selected.


          This is also dependant upon the fields on the portal row not being editable.


          The programming is not overly difficult, determinging the workflow to fit within your system will likely be more difficult.

          1 of 1 people found this helpful
          • 2. Re: Selecting more than one record in a portal

            Thanks - I was hoping not to have to code a workaround like the ones you describe, but looks as if I'll just have to get on & do it...

            • 3. Re: Selecting more than one record in a portal

              It's actually a bit more complex than that - if you want to accomodate multiple users. You should use a global field or variable to hold a return-separated list of the selected rows' IDs. Make shift-click add/remove the clicked row's ID  to/from the list.