6 Replies Latest reply on Jul 30, 2014 6:55 AM by philmodjunk

    Portal row numbering

    LouParkinson

      Title

      Portal row numbering

      Post

           I have a portal with each row auto-numbered sequentially.

           If I delete a row how can I reset the numbering on that row to avoid creating gaps in the sequential numbering ?

           Thanks for suggestions

        • 1. Re: Portal row numbering
          philmodjunk

               How do you intend to use this numbering. Do you just need to number the ROW for display purposes or do you need to number each RECORD so that you can refer to that record by this number in other contexts?

               The reason that I ask this question is that you can remove the field that you are currently using and use the Insert menu to insert a record number symbol into your portal row. This will automatically number each row of the portal but does not actually number the records.

          • 2. Re: Portal row numbering
            LouParkinson

                 I need to be able to number the row for display purposes.

                 Can you explain better how to do this?  ;   remove the field that you are currently using and use the Insert menu to insert a record number symbol into your portal row.

                 Thanks

                  

            • 3. Re: Portal row numbering
              philmodjunk

                   What you get from this depends on whether you have Filemaker 11 and older or FileMaker 12 and newer.

                   The steps are the same:

                   enter layout mode on your layout.

                   Use the text tool (capital T tool) to create a new text object on your layout.

                   WIth the cursor in this new text object, pull down the Insert menu and select "Record Number Symbol".

                   In newer versions, this inserts the text: {{RecordNumber}} In older versions, you'll get @@. Placed in a portal, this layout symbol will number the portal rows sequentially. In either version, if you were to return to browse mode at this point, you'd see a number for the current record number in place of this text. But don't do that yet.

                   Now drag this text object to place it inside your portal so that it is completely inside the portal row and "owned" by the portal. Drag the portal a few pixels and make sure that it moves with the portal if you are using FMP 12 or newer.

                   It does no harm for this layout text to overlap adjacent objects while in Layout mode as long as the value appears in the correct place when in Browse mode. But if you want, You can select all the text of {{RecordNumber}} shown in red and specify a very small (even just 1 point) font size to reduce the space taken up when you view this in layout mode and it won't change the appearance of the value in Browse mode. (The text style options you select for the outer {} determines the style you'll see.

              • 4. Re: Portal row numbering
                LouParkinson

                     Thanks we appreciate your help.

                      

                • 5. Re: Portal row numbering
                  flamecoder

                       Is there anyway to make the RecordNumber symbol display in descending order? Largest number in the first portal row counting down to 1 in the last used portal row.

                  • 6. Re: Portal row numbering
                    philmodjunk

                         There is not. You'd need to set up your own calculation field to compute that value.

                         Assuming an unfiltered portal,

                         count ( PortalTable::NeverEmptyField ) can be the definition for a calculation field in the layout's table. We'll call it "PortalCount".

                         Then a calculation field in the portal's table can be defined as:

                         LayoutTable::PortalCount - Get ( RecordNumber ) + 1