Poida Posted April 25, 2003 Posted April 25, 2003 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
mun Posted April 25, 2003 Posted April 25, 2003 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.
cjaeger Posted April 25, 2003 Posted April 25, 2003 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()
Recommended Posts
This topic is 7887 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