Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5991 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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.

Posted

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

  • Newbies
Posted

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

Posted

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

  • Newbies
Posted

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

Posted

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

Posted

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.

This topic is 5991 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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