Newbies Shedboyxx Posted March 28, 2011 Newbies Posted March 28, 2011 Looking for a way to do this. Here’s the simple explanation. F1- One field has a 5 letter code (‘DW009’) F2 -Another field has a block of text (“Please delete ‘AB009’ and then quit”) that is the same on every record There is a code in the block of text(‘AB009’) that I want to replace with the code from each of the F1 fields. Couple of things. There are 150 records to change. The block of text is much bigger and is actually a SQL query that needs to be specific to each code in field 1 (F1). I was thinking of a calculated Replace but it started getting ugly fast. The calc would be: Go get the code in F1 and replace this text “DW009” with F1’s field contents. This would either be a replace or calc with a script to loop through the records. I then have to export out the contents to a master text document ….or individual text docs if I have to. Any recommendations?
comment Posted March 28, 2011 Posted March 28, 2011 Assuming all occurrences of "‘AB009’" in F2 should be replaced, try a calculation field (result is Text) = Substitute ( F2 ; "‘AB009’" ; F1 ) To replace the actual content of F2 would require either a looping script or running Replace Field Contents… with a calculated result using the same formula. Make sure you have a backup if you go that way.
Newbies Shedboyxx Posted March 29, 2011 Author Newbies Posted March 29, 2011 Assuming all occurrences of "‘AB009’" in F2 should be replaced, try a calculation field (result is Text) = Substitute ( F2 ; "‘AB009’" ; F1 ) To replace the actual content of F2 would require either a looping script or running Replace Field Contents… with a calculated result using the same formula. Make sure you have a backup if you go that way. Looks like that does it. Thanks!
Recommended Posts
This topic is 5046 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