Skip 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.

Setting serial numbers for a subset of records

Featured Replies

  • Newbies

I would like to set serial numbers for a subset of records. First, I sort all the records with two criterias, so that the records with the same entry in the first sorting criteria are grouped together. I name them 1st-criteria-groups. Then I would like to set serial numbers (1,2,...) for each individual 1st-criteria-group.

I know how to build a script that sorts with two criterias. But I don't know how to generate serial numbers, that always start over again.

With relational databases are serial numbers serious business, which yours frankly can't be. You seem to wish for a numbering to a relative position in a listing.

You need to explain what kind of listing we're talking about here, what is the purpose of these serial numbers, what are they "in the eye of the beholder"? Are we talking summaries, portals or something third here?

--sd

  • Author
  • Newbies

Sorry, for not being clear enough....

Yes, I'd like to do a numbering to a relative position in a list.

The records are listed and sorted in a portal. I would need the serial numbering in order to display in another portal only the "top two" records of each subset.

I appreciate any help / ideas !!

dama

The records are listed and sorted in a portal.

Try this just ahead of the first field in the row, do in layout mode type in a @@ ...and see if it fits the purpose?

--sd

  • Author
  • Newbies

The @@ gives me a numbering through all the records in the portal, but the numbers don't start at 1 again, which each new 1st criteria.

Maybe to explain better: Assuming I have two rows like that:

a - 10

a - 5

a - 1

b - 10

b - 5

b - 1

...and then want to have serial numbers like that:

a - 10 - 1

a - 5 - 2

a - 1 - 3

b - 10 - 1

b - 5 - 2

b - 1 - 3

...in order to display in another portal only records with serial nr. 1 and 2:

a - 10 - 1

a - 5 - 2

b - 10 - 1

b - 5 - 2

It's done by putting a calc'field in the portal records table using:

http://www.filemaker.com/help/FunctionsRef-39.html

If the same field in the row above is a different category in a Case( or If( statement use "1" else the value from above+1 ....

--sd

The numbering part is easy: define a summary field in the child table as running count of ChildID, with restart when sorted by category. Then place this field in the portal.

However, you cannot use this field to isolate the first two records in each category for the purposes of a relationship. That's a completely different issue.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.