kenneth2k1 Posted January 16, 2002 Share Posted January 16, 2002 Hello everyone!! I want a script to clear certain fields for ALL records. Then I want to attach it to a button. I want to be able to keep personal information (such as name, address, phone, etc.), but have it clear campaign information (letter print dates, appointment information, etc.) I wrote a script that looked like this: Go to Record/Request/Page [First] Loop Clear [select, "Letters1"] Clear [select, "Letters2"] Clear [select, "Appointment Date"] blah, blah, blah.... and so on and so forth Go to Record/Request/Page [Exit after last, next] End Loop ...but it doesn't work. It only clears the fields of the current record. It seems to loop, because I can see it scroll through the records. Is there any tricks or shortcuts?? Should I use this instead: Set Field ["Letters1", "="] YOU GUYS ARE COOL Thanks for your help! Ken Link to comment Share on other sites More sharing options...
slstrother Posted January 16, 2002 Share Posted January 16, 2002 Hi Ken Try this script: show all records go to record/request page first clear[select,"Letters1"] replace[no dialog,"Letters1",Current Contents"] Then repeat for all of the fields you want to clear. Good Luck, Steve Link to comment Share on other sites More sharing options...
Rigsby Posted January 16, 2002 Share Posted January 16, 2002 Using the “Replace” command instead of clear is a good idea so I would use the advice above. However, regardless of Clear or Replace, your script WON’T work if the fields you want to alter are not on the current layout! Create an empty layout called “Clear Message” and place a message dialogue in the middle saying something like “PLEASE WAIT – FIELDS ARE BEING CLEARED” Now put all the fields you want to clear onto this layout and test the script. If everything works ok, set all the fields to the smallest text size possible, then to transparent, do not allow entry into these fields, no lines and send them to the back. Now hide them behind your message dialogue. Add the Freeze window command to your script or you will see the hidden fields flashing. Now you simply need to run your script, going to this layout, then leaving it when it’s finished. Link to comment Share on other sites More sharing options...
kenneth2k1 Posted January 17, 2002 Author Share Posted January 17, 2002 Thanks for your guys' reply. I'm gonna try that, Rigsby. Ken Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 8133 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