Many moons ago someone designed a field for State but didn’t limit it to two characters. I would like an agent that will delete anything after the first two characters out of that field for all occurences in the database.
Can anyone help?
Many moons ago someone designed a field for State but didn’t limit it to two characters. I would like an agent that will delete anything after the first two characters out of that field for all occurences in the database.
Can anyone help?
Subject: Stripping a character
Mark,
In formula language it would be…
State=@left(State;2)
In script it would be…
State=left$(State,2)
You will need to create an agent that has the setting run on “All documents in database”. If unsure, just read about Agents in the Notes help database.
HTH
Mike
Subject: := in Formula, not =
Subject: RE: Stripping a character
So for instance, if the field contains “Minnesota” you would change it to “Mi”? That’s clever.
You could certainly do this with an agent that is set to process all documents and uses the following formula:
SELECT Form = “whatever” & @Length(State) > 2;
FIELD State := @Left(State; 2)
If you wanted to do something a bit more intelligent, you could look at @Replace instead of @Left.
Subject: RE: Stripping a character
if the field contains “Minnesota” you would change it to “Mi”? That’s clever.
But of questionable utility. For example, both Michigan and Minnesota would become Mi, Texas and Tennessee would become Te, Alaska and Alamaba become Al…well, you get the idea. You’ll need to write a rather long formula with @Replace to really fix this.
Subject: “Irony? We don’t use that much around here.”