February 16, 200421 yr I've been searching the forum and still can't find a solution to change the text with-in a text field. Example: FLD Name( Desc) FLD contents( United States of America - Midwest Region) I'd like to change the contents of Desc when it has (United States of America) to just plain ol (US) so the contents will now look like ( US - Midwest Region). I've tried the Replace and Subsitute function with no luck..
February 16, 200421 yr Create a calculation field with Substitute( Desc, "United States of America", "US" ). Display this field instead of the Desc one.
February 16, 200421 yr Hi Greg ... Try: Substitute(Desc, "United States of America", "US") If you want to make this change to all your records, put it in a looping script. Go To Record/Request [First] Loop Set Field [Desc, Substitute(Desc, "United States of America", "US")] Go To Record/Request [Next, Exit after last] End Loop
February 16, 200421 yr Look into the Find/Replace script step too. I've just begun using it and like it, though it's not as fast IMHO as Set Field but it has other advantages... The Set Field[] step will kill all character formatting in the text, whereas the Find/Replace step will not. However, Find/Replace is layout dependent (the fields need to be on the current layout when the command runs) but that's not too much of a trade-off.
February 16, 200421 yr Author Queue and Jim, Thats for the help. I'm still a novice and learning. I was close but missed the set field part. Thanks Greg
February 16, 200421 yr One thing you should be aware of is that Substitute is Case sensitive, so if it happens that your text was entered as UNITED STATES OF AMERICA, the substitute wouldn't work. You'd then have to change it to Substitute(Proper(Text), "United States Of America";"USA") My 2 cents
Create an account or sign in to comment