Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help: Auto increment apha numeric Serial Numbers

Featured Replies

  • Newbies

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

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.

  • Author
  • Newbies

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"

  • Author
  • Newbies

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?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.