September 20, 200025 yr Newbies Is this possible in FM 4.1 to write a script that will create 100 records with field values from "1" to "10" and "A" to "J". i.e. to have 100 records that are labelled 1A, 2A, 3A
September 20, 200025 yr quote: Originally posted by Matt: Is this possible in FM 4.1 to write a script that will create 100 records with field values from "1" to "10" and "A" to "J". i.e. to have 100 records that are labelled 1A, 2A, 3A
September 21, 200025 yr It's actually pretty simple. Define two fields: Serial No. (number, autoenter, 1 by 1) Special Serial No.(calculation, text) = Case(Mod(Serial No., 10) = 0, 10, Mod(Serial No., 10)) & Case(Int(Serial No./10) = 0, "A", Middle("ABCDEFGHIJ", Int((Serial No.-1)/10) + 1, 1)) -bd [This message has been edited by LiveOak (edited September 20, 2000).]
September 21, 200025 yr Author Newbies Thanks for that it works fine, but I can't work out a way to reset the serial No. field so I can create subsequent sets of 100 records (I would like to identify each set with three other pieces of user inputed info). Will I have to make the serial No. field a value list? Is it possible? Thanks again
September 26, 200025 yr Ah, ha! So that wasn't the EXACT question, how to do this for 100 records! I am prone to answer the question you asked, not the one you should have asked! . Extra Special Serial Number (calc, text) = Case(Mod(Mod(Serial No., 100), 10) = 0, 10, Mod(Mod(Serial No., 100), 10)) & Case(Mod(Serial No.,100) = 0, "J", Int(Mod(Serial No., 100)/10) = 0, "A", Middle("ABCDEFGHIJ", Int((Mod(Serial No., 100)-1)/10) + 1, 1)) -bd [This message has been edited by LiveOak (edited September 25, 2000).] [This message has been edited by LiveOak (edited September 25, 2000).]
Create an account or sign in to comment