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

Help: Auto increment apha numeric Serial Numbers


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

Recommended Posts

  • Newbies
Posted

Hi all i am kinda new to FM andi looked trought the forums and coulnd find the solution to my problem.

this is what i want to do:

background:

i want to wirte an invetory control program, for computer parts, ie have loads of RAM for example and when the items come into the office there have serial numbers, these sometimes are in batchs, ie batch of 50 with sequeential serial numbers.

so this is what i wanna do, i want to be able to have an auto incermental script for serial numbers which will auto incerment serial numbers accordingly to the amout that is entered in the quantity field.

qty: []

start serial number: []

[generate] <--button

this will the generate seial numbers for the products and then be added into inventory

not sure if this is all clear but thats what i wanna do

any ideas?

"Z"

thanks again

Posted

Sure. Let's assume that your serial number field is called tSerial. Define two global fields, one called gQty and one called gSerial. These are the fields you will type your parameters into (quantity and starting serial #). Then create a looping script that looks basically like this:

Loop

Exit Loop If gQty=0

New Record/Request

Set Field (tSerial, gSerial)

Set Field (gSerial, gSerial+1)

Set Field (gQty, gQty-1)

End Loop

What happens here is that the script loops until gQty reaches 0, and each time it runs through, it bumps up the serial number by 1.

  • Newbies
Posted

Thanks for that, but i stioll cant get it to work, i see the logic behind it, but just cant seem to get the seril number to insert within the specified field.

ie have the generated numbers inserted within the specified product serial number field?

any ideas?

thanks again

"Z"

  • Newbies
Posted

ok kinda got it working, now, added another siled whre the outcome gets coppied to . is it possible for me to use alphanumeric serial numbers?

and another thing donno if ya can help. i wanna be able to assign the serial numbers to easch product, i think i would just use the copy and paste function. but like i wanna be able to create the require number of fields accordinly to the qty?

any ideas?

This topic is 7684 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.