ruthcarlton Posted May 17, 2002 Posted May 17, 2002 I have 3 types of merchandise; shirts, hats, stickers. I would like each item to have a unique ID that follows the form shirt 1, shirt 2.... sticker 1, sticker 2... hat 1, hat 2 Is there a way to auto-enter that info? I can get shirt 1, hat 2, shirt 3, sticker 4, by using a caluclation of "Item Description" & "Serial #", but that's not what I am trying to achieve. Thanks.
Fitch Posted May 17, 2002 Posted May 17, 2002 A fairly straightforward way to do that is to create 3 new files: hat numbers, shirt numbers, and sticker numbers. In each file make an auto-enter serial number text field. Now you can make a script in your merchandise file something like: If(Item Description = "hat") . Perform script(external, hat numbers) Else . If(Item Description = "shirt") . . Perform script(external, shirt numbers) . Else . . Perform script(external, sticker numbers) . End If End If The external script in each file would create a new record, then you grab the serial number either by copying and pasting (the uncool way) or setting a global field to the number, then setting your merch. serial no. to the global (the cool way).
Fitch Posted May 17, 2002 Posted May 17, 2002 I should be getting some sleep, but... Another way to do this is to make a self-relation description::description, then make a script that sets the serial number to Max(description::serial number) + 1.
Recommended Posts
This topic is 8297 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 accountSign in
Already have an account? Sign in here.
Sign In Now