February 25, 200223 yr Hi! I have a button that moves from one layout to another. How can I add a script that will take us to the next layout, but also clear one of the fields IN that layout? Thanks much! Ben
February 25, 200223 yr In your script simply add the line Clear (your field here) So your script reads. Go to layout (x) Clear (your field here) Go to layout (y) You can use the set field (your field, "") for any text or number field instead. If you do use clear, make sure that field exists on the layout.
February 25, 200223 yr I never use "Clear" -- it's unreliable. I always use "SetField". Just my personal recommendation.
February 25, 200223 yr Dan, my thoughts exactly. It was just expressed to be used by the topic starter. I also use set field, then the field does not have to be on the layout, but this is a problem when it comes to date and time fields, if you want it to be changed to blank. Could use an insert calculated result, but then the field must be on the layout. Always create a developer layout that has every field on. Then you can just go to that layout and perform whatever interaction you need with any field.
February 25, 200223 yr Author Thanks!! That definitely worked. Last question. After the field is cleared, the cursor is left IN the box. Is there a way to, in a way hit "enter" so that the new number is figured into an equation? Thanks! Ben
February 25, 200223 yr Yes is the answer to that. In your script add a Go To Field line but do not specify a field. This makes it leave all fields.
March 4, 200223 yr I always use the Cut script step when setting Date or Time fields to blank. The field does need to be on the current layout and of course you must not be in the middle of a copy/paste routine. Always worked fine for me. Andrew Bruno
March 4, 200223 yr The better way to set date and time fields to blank is TextToDate("") or TextToTime("").
Create an account or sign in to comment