dancer5678 0 Posted September 11, 2020 Share Posted September 11, 2020 I am a beginner in Filemaker using Filemaker 18 and I need a script to increment a number by 1. I have 3 fields. Start Number End Number New Number I want to enter a number in the start field "50" I want to enter a number in the end field "100" I need the script to create a new record each time filling in the "New Number" field starting at 50 and ending with 100 Please dumb down the answer as much as possible because I am not at all familiar with scripting. Thanks in advance for the help Link to post Share on other sites
comment 1,778 Posted September 11, 2020 Share Posted September 11, 2020 Can you explain why you need this? It seems like you should have two tables: a parent table where you would enter the start and end values; and a child table where the script would create an individual record for each value between start and end, and relate it to the parent record. Having all three fields in the same table makes very little sense. Link to post Share on other sites
dancer5678 0 Posted September 11, 2020 Author Share Posted September 11, 2020 I need to create a unique barcode for each record. can you give your suggestions as to how to accomplish this. Please dumb it down as I am new to Filemaker. I know how to make tables Link to post Share on other sites
comment 1,778 Posted September 11, 2020 Share Posted September 11, 2020 8 minutes ago, dancer5678 said: I need to create a unique barcode for each record. I am afraid that doesn't tell me much. Please explain what do these numbers represent in real life and how do you intend to use them one they are generated. Link to post Share on other sites
dancer5678 0 Posted September 11, 2020 Author Share Posted September 11, 2020 Once generated I will create a barcode field from the gererated number which i can print out. I need to create unique barcodes for products Link to post Share on other sites
comment 1,778 Posted September 11, 2020 Share Posted September 11, 2020 I am still in the dark regarding your purpose. See if the attached demo can be adapted to your situation. GenerateSeries.fmp12 Link to post Share on other sites
dancer5678 0 Posted September 11, 2020 Author Share Posted September 11, 2020 Thanks for helping me with this Your idea works But I need each value it creates to be a separate record. Can you assist me with that? Link to post Share on other sites
comment 1,778 Posted September 11, 2020 Share Posted September 11, 2020 Just now, dancer5678 said: I need each value it creates to be a separate record. Each value it creates IS a separate record in the Child table. Link to post Share on other sites
dancer5678 0 Posted September 11, 2020 Author Share Posted September 11, 2020 Thank you for your help. It looks like it will work. One other question. In filemaker after data is entered is there a way to lock the data so it cant be modified by the user. For example the data entry department enters the data But you don't want the sales staff to be able to alter what they entered Link to post Share on other sites
comment 1,778 Posted September 11, 2020 Share Posted September 11, 2020 6 minutes ago, dancer5678 said: you don't want the sales staff to be able to alter That can be handled by taking away editing privileges from the privilege set of the sales staff - see: https://help.claris.com/en/pro-help/index.html#page/FMP_Help%2Fcreating-editing-privilege-sets.html%23 Post a separate question if you need more help with this. Link to post Share on other sites
dancer5678 0 Posted September 11, 2020 Author Share Posted September 11, 2020 I am back to the barcode database question. I added a field called "Barcode" and a field called "Barcode Calculation" I need the value that you are creating in the child table record to go into the barcode field so that I can change the Barcode Calculation field to a Barcode font. Right now it is showing up as a 0 I have attached the DB you sent me with my additions. can you tell me what I have to fix to make this work. GenerateSeries.fmp12 Link to post Share on other sites
comment 1,778 Posted September 11, 2020 Share Posted September 11, 2020 IIUC, you want to make the calculation = "*" & Value & "*" and set the result type to Text. You don't need two calculation fields for this. In fact, you may not need a calculation field at all - you could simply type: *<<Value>>* directly onto the layout. Link to post Share on other sites
dancer5678 0 Posted September 11, 2020 Author Share Posted September 11, 2020 Thank you for your assistance with the scripting. It was very helpful Link to post Share on other sites
dancer5678 0 Posted September 11, 2020 Author Share Posted September 11, 2020 How could I modify the value to have a letter after it like "A" Link to post Share on other sites
Recommended Posts
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