K1200 Posted May 19, 2006 Posted May 19, 2006 I'm trying to construct a simple script to clear a text field in the last 10 records of a 20-record table, but the script always clears the field in all of the records. Enter Browse Mode [] Go to Record/Request/Page [No dialog; 11] Loop Replace Field Contents [No dialog; Table::Field; ""] Go to Record/Request/Page [Next; Exit after last] End Loop This is my first attempt to use looping in a script, so I've obviously missed something very basic. I just haven't been able to locate a relevant example to get me on the right track.
mz123 Posted May 19, 2006 Posted May 19, 2006 The "replace field contents" step replaces everything in the found set. Use your script and change "Replace Field Contents" to "Set Field[Table::Field; ""] Hope that does it!
IdealData Posted May 19, 2006 Posted May 19, 2006 Although your loop will execute quite quickly you can still keep the script you are using but use the "omit records" script step to leave out he first 10 records and then use the replace. Like I say 10 records is pretty quick, but 10,000 would be quite different. Only a "heads up" on technique.
K1200 Posted May 19, 2006 Author Posted May 19, 2006 Thanks to you both. Things make a lot more sense now.
Recommended Posts
This topic is 6765 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