Newbies Chaosblade323 Posted July 29, 2013 Newbies Posted July 29, 2013 (edited) 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 July 30, 2013 by Chaosblade323
Matthew F Posted July 30, 2013 Posted July 30, 2013 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
Rick Whitelaw Posted July 30, 2013 Posted July 30, 2013 However you work this out, you should not use this field as a match field. Use an auto entered serial instead.
Newbies Chaosblade323 Posted July 30, 2013 Author Newbies Posted July 30, 2013 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
Matthew F Posted July 30, 2013 Posted July 30, 2013 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.
Recommended Posts
This topic is 4133 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