April 25, 200322 yr Hi guys, I am working on a database for my school which contains a field for the scholastic year of each child. (As opposed to the class which may be 3/4J for example) The scholastic year must be upgraded each year when the kids start back at school. What I am after is a script that will upgrade each scholastic year when I run it. ie K will become 1 1 will become 2 2 will become 3 3 will become 4 4 will become 5 5 will become 6 Any help would be greatly appreciated. Many thanx
April 25, 200322 yr I think this what you are after - in the script editor you can use nested if's: If["scholasticYear = "K""] Set Field ["scholasticYear","1"] Else If["scholasticYear = "1""] Set Field ["scholasticYear","2"] Else . . . End If End If You get the picture. So now when you run this script for a record, it will update for you.
April 25, 200322 yr or do a script Replace, field "scholasticYear", no dialog, TexttoNum(scholasticYear) +1 (since K is not a number, it will evaluate as 0) The TexttoNum() is not stricly necessary, but safer. This does not work with letters "Y" or "N", as they evaluate as bool operators YES and NO. see help - texttoNum()
Create an account or sign in to comment