Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!g27g2000yqa.googlegroups.com!not-for-mail From: "Joseph O'Brien" Newsgroups: comp.databases.filemaker Subject: serializing a subset of records (FMP6) Date: Wed, 1 Feb 2012 12:18:17 -0800 (PST) Organization: http://groups.google.com Lines: 14 Message-ID: <8a0f2829-1163-4bbc-9e81-47e642d870a0@g27g2000yqa.googlegroups.com> NNTP-Posting-Host: 74.143.138.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1328128412 5922 127.0.0.1 (1 Feb 2012 20:33:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 1 Feb 2012 20:33:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g27g2000yqa.googlegroups.com; posting-host=74.143.138.236; posting-account=3aUapwkAAAAKaB6KUOmKNwOrsxgR3hyB User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKUARELSC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.databases.filemaker:599 I frequently run across a situation in which I need to sequentially number a subset of records. I have done this several different ways over the year, but I wanted to see if there is a "right" way. For example, let's say I have a "jobs" table and a "proofs" table. A job can have many proofs. Proofs are numbers 1, 2, 3, etc. Simply serializing the number won't work, because that doesn't "reset" for each job. In the past, I have scripted it ("Am I the first record in this relationship? If not, what was the last one? OK, now add 1 to that."). I also tried to do a calculation to the same effect (I might have had to concatenate a few values and then pull the right-most number, or something like that). Both of those seem kind of dirty. Is there a more elegant way?