hartmut77 Posted May 12, 2003 Posted May 12, 2003 Thanks to everyone here I am getting my text calculation right The last thing I don't understand is how to remove something extra I ended up with a field in my address calculations that contains the county name and the county code. I want to eliminate the county code which is always 7 characters including the parenthesis in the front and back . for example Orleans (36073) I want to remove the county code at the end only I am not sure how to do this Thanks Dave
cjaeger Posted May 12, 2003 Posted May 12, 2003 Left(textfield, Length(textfield)-Lenght(" (36073)")) or Left(textfield, Length(textfield)-8)) or Left(textfield, position(textfield," (",1,1)-1)) ....
EddyB Posted May 12, 2003 Posted May 12, 2003 Set up a script: Set Field ["fieldname", Replace( fieldname, Position( fieldname, "(" , "(" , 1) , 7 , "")] replace fieldname with the name of the field that contains the county name and county code of course! This sets the field to the original contents of the field but replaces 7 didgits after the ( with "" (nothing) If you want to do this for every record in your db just add find all to your script and set it in a loop to go to next field, exiting after last. Eddy.
hartmut77 Posted May 12, 2003 Author Posted May 12, 2003 Thank you Eddy and Christian. This is great!!
Recommended Posts
This topic is 8212 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