Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #600

Re: serializing a subset of records (FMP6)

From Martin Τrautmann <t-usenet@gmx.net>
Newsgroups comp.databases.filemaker
Subject Re: serializing a subset of records (FMP6)
Date 2012-02-01 21:52 +0000
Organization slrn user
Message-ID <slrnjijd0a.3pt.t-usenet@ID-685.user.individual.de> (permalink)
References <8a0f2829-1163-4bbc-9e81-47e642d870a0@g27g2000yqa.googlegroups.com>

Show all headers | View raw


On Wed, 1 Feb 2012 12:18:17 -0800 (PST), Joseph O'Brien wrote:
>  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?

What you do is the best way to make sure the proper numbers.

What I do on occasions is that I just do need access to the previous
record within a certain subset of records, after a find operation.

I have a field "zs" which auto enters a serial number,
a calculation field "zs–1" = zs - 1
and a relation from zs to zs–1.

I then just select the zs field on the layout and use the "Replace"
operation to replace its field contents with a new serial number,
incrementing the latest current zs value. 

Thus my zs numbers become larger and larger, while they do maintain a
certain order within a temporary subset of records.

The "Replace" operation is the most primitive - or name it elegant -
way, for a certain purpose.

- Martin

Back to comp.databases.filemaker | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

serializing a subset of records (FMP6) "Joseph O'Brien" <obrien1984@hotmail.com> - 2012-02-01 12:18 -0800
  Re: serializing a subset of records (FMP6) Martin Τrautmann <t-usenet@gmx.net> - 2012-02-01 21:52 +0000
  Re: serializing a subset of records (FMP6) HelpfulHarry@BusyWorking.com (Helpful Harry) - 2012-02-02 13:26 +1300

csiph-web