July 29, 201312 yr 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 July 30, 201312 yr by Chaosblade323
July 30, 201312 yr 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
July 30, 201312 yr However you work this out, you should not use this field as a match field. Use an auto entered serial instead.
July 30, 201312 yr 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
July 30, 201312 yr 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