Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auto number portal rows?

Featured Replies

How does one write a script to auto number a portal row as each new portal is created related to a record? I have an order database that has a portal for line items. I would like to give each line item it's own number. If I have to rely on people to enter the number it happens sporadically. I would like the user to still have the ability to enter the field and change it if they decided that one item should be ahead or before another.

you could add auto enter option and use the Get ( PortalRowNumber ) function - however, should you delete a portal row in the middle of your items, then the next number may be a duplicate.

If you were using FileMaker 10 you could add script triggers that could trigger when you exited a field or modified the record updating all the children records. - You could do so in v8 with a plugin but not as maintenance free.

If you don't need the row number in the actual child table and this is just to be used to show for display row number just add @@ in the portal so that each row has a number.

Set up a self join relationship between the LINE_ITEMS table using the OrderID field as the key, this will group together all the LINE_ITEMS that belong to a specific ORDER:

LINE_ITEMS.SelfJoin = LINE_ITEMS.OrderID::LINE_ITEMS.OrderID

Use the new relationship with the MAX function in an AutoEnter field (say, LineNumber)

So.

LineNumber =

Max (LINE_ITEMS.SelfJoin) + 1

This will always increment the LineNumber and won't be duplicated and the users can still modify the LineNumber.

I did such a thing so a user could manually change the sort order for the LINE_ITEMS, thus printing the ORDER in their preferred sequence.

  • 2 years later...

Hello,

I found this post and am trying to figure this out.

Edited by Lee Smith
Remove the quote of IdealData above.

Instead of quoting an entire post, explain what you do not understand.

My notes were in Red in the quoted part.

Then why quote the entire post? The "notes" were in the quote and appeared to be part of it. You should have asked your question below the part of the post you wanted to quote that you were referring to. You do not need to quote the whole body when referring to another post. Just delete those part that are not pertinent your question.

Try asking your question again without quoting the whole thing.

  • 5 months later...
  • Newbies

{{RecordNumber}}

 

 

Alex .S.

Filemaker Developer Toronto

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.