3 Replies Latest reply on Dec 23, 2011 10:01 AM by Stephen Huston

    Portal move lines

    fclose

      Hello,

       

      here I come again with some questions about FileMaker portals.

       

      Is it possible to do some manipulations to a portal like you would do in a simple excel spreadsheet i.e. move a line up, down, insert a line etc ...

       

       

      Fred

        • 1. Re: Portal move lines
          Jaymo

          Related records in a portal are displayed in creation order or the sorted order of the portal or relationship. In order to move a portal row up or down one row, you need to change the sort order. This can be done by manipulating the value in a field on which the sort is based upon (usually with the Set Field script step). I don't have an example file of how to do this but maybe someone else will here. I will caution you to watch out about record locking if this solution is to be used in a multi-user environment.

          • 2. Re: Portal move lines
            chris.schmitz

            There are lots of different ways to change the order of records in a portal, but at a very very basic level to create a custom order you can create a field in the table that the portal is pointing to called Order and then put that field into the portal. Have the portal sort decending by the Order field. Then when in browse mode start numbering the portal rows from 1 to X. Once you click out of the portal the rows will resort to the order you've given it.

            • 3. Re: Portal move lines
              Stephen Huston

              Hi Fred,

               

              Building on Chris' idea:

               

              If you make this sorting field a true number field, you can use decimal places to force a record to sort between two others without having to renumber anything but the one record you want to move (i.e. number it 5.5 to force it between 5 and 6, or even 5.15 to force it between 5.1 and 5.2). Decimals won't require that you ever renumber more than the one you're moving, unless you really want to clean them up for aesthetic reasons.

               

              Not especially elegant, but simple kludges often work fine for seldom-needed tasks, manual overrides, and particularly for power-users.

               

              Stephen Huston