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.

Featured Replies

  • Newbies

What I am trying to do is create new records where the amount of the records is specified by the user.  What i have is 3 field records, where two of the fields will stay the same for the loop but one field( serial number) will auto increment  X times.

 

so I have a form that looks like this

Serial field [uR14M10000003]

Field 2 [sO13333]

Field 3 [v2.3]

[button]

 

So what I would think would work would be to when I Clicked the button ask the user how many times they want to increment said record, Set that to my loop variable, then add record for each time in the loop.  ( it could loop 5 -500 times all depends on what the user selects)

 

But my problem is I cant seem to find out how to scrip this or when I use custom dialog it want to link input to a field

 

I should clarify they serial field can have multiple types of serials like UD12M100000003. UR12M1233333, etc but all will be unique 

 

 

Edit: I made a work around atm by creating a button that makes an import from an excel file since excel can auto increment just fine.....but that requires the users to know how to set the excel file up just so...I would prefer if i can get it done all within FM

Edited by Chaosblade323

Solved by Matthew F

Go to solution
  • Solution

It sounds like there are several issues you are trying to address.  Perhaps this example file accomplishes what you are attempting? Based on your criterion it does the following:

 

1. Creates a serial number based on two attributes (an alphanumeric prefix coupled to a integer serial number)

2. Prompts the user to make multiple records in a looped script

3. Duplicates the non serial number fields. 

 

Hope that helps. 

Serials.fmp12.zip

However you work this out, you should not use this field as a match field. Use an auto entered serial instead.

  • Author
  • Newbies

Thanks Matthew, that does solve my main problem with that loop.  I should be able to work out the rest on my own, for instance starting at a different point in the sequence of serial numbers

 for instance starting at a different point in the sequence of serial numbers

 

Note that the "Reset Serial#" button uses the Set Next Serial Value script step.  You can modify this to set the serial numbers to whatever you want.  I included it to avoid leaving gaps in the serial numbers if you make some records and then delete them again. 

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.