January 16, 200223 yr 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
January 16, 200223 yr 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
January 16, 200223 yr 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.
Create an account or sign in to comment