home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.databases
- Path: sparky!uunet!cs.utexas.edu!sun-barr!decwrl!csus.edu!netcom.com!jeffp
- From: jeffp@netcom.com (Jeff)
- Subject: 4D Field Incrementing
- Message-ID: <1993Jan22.081803.9058@netcom.com>
- Organization: BeHereNow
- Distribution: usa
- Date: Fri, 22 Jan 1993 08:18:03 GMT
- Lines: 41
-
-
- I want to increment ad integer in an Input Layout starting @ 1000.
- I created a "dummy" file with one record that has the value of 1000.
- Then I added a script to the individual fields that have the same name
- in a different file, as in the dummy file.
-
- So I want to assign a the number to the field once, but I don't want it
- to update as the value in the Dummy field increments for Adding Records
- later on...
-
- If I have a [Clients]ClientNumber field, and a [Dummy]ClientNumber place
- holder field, can I assign the value and increment it like this?:
-
- $RecNum:=Record number
- If ($RecNum=-3)
- vClientNum:=([Dummy];[Dummy]ClientNum)+1
- ([Dummy];[Dummy]ClientNum):=vClientNum
- [Clients]Client_Num:=vClientNum
- End If
-
- I think something like this in the [Clients]ClientNumber field would
- work, but I tried it and it doesn't work...
-
- Or is this better for some reason?:
-
- If ([Clients]Client Number=0)
- [Clients]Client Number:=[Dummy]Client Number
- SAVE RECORD([Clients])
- [Dummy]Client Number:=([Dummy]Client Number + 1)
- Save Record([Dummy])
- End if
-
- If you see obvious syntax errors, feel free to point them out (other
- than field names).
-
- Thanks,
-
- Jeff-
-
-
-
-