onlyu2 Posted February 25, 2002 Posted February 25, 2002 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
andygaunt Posted February 25, 2002 Posted February 25, 2002 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.
danjacoby Posted February 25, 2002 Posted February 25, 2002 I never use "Clear" -- it's unreliable. I always use "SetField". Just my personal recommendation.
andygaunt Posted February 25, 2002 Posted February 25, 2002 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.
onlyu2 Posted February 25, 2002 Author Posted February 25, 2002 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
andygaunt Posted February 25, 2002 Posted February 25, 2002 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.
AndrewBruno Posted March 4, 2002 Posted March 4, 2002 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
SteveB Posted March 4, 2002 Posted March 4, 2002 The better way to set date and time fields to blank is TextToDate("") or TextToTime("").
Recommended Posts
This topic is 8304 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