Newbies BrianL Posted October 28, 2002 Newbies Posted October 28, 2002 I'm stuck writing a script that includes a step to 'empty' or clear a date field. I've tried 'Set Field', but the 'Specify/Calculation' dialog box requires an entry. I have tried entering "" to this box, but this results in the formula Set Field["FieldName",""""] which the field displays as an error. Any ideas?
spb Posted October 28, 2002 Posted October 28, 2002 I ran into this trying to empty a global date field. I solved it by using Clear instead of Set Field. I may be wrong, but one potential problem mightbe that unlike Set Field, Clear will only work if the field is displayed on whatever layout your script has you at that moment. So you might need to toss in a Go To Layout command right before Clear. The theory, I guess, is that Set Field sets the field to nothing, which is not a valid date. But Clear will empty the field, leaving behind a "nothing" representing no date, which *is* a valid date. Steve Brown
kenneth2k1 Posted October 28, 2002 Posted October 28, 2002 Yes you are correct, but as Steve has posted, the DateToText should take care of the invalid date problem. I personally like using set field because I don't like worrying about switching layouts. Ken
Recommended Posts
This topic is 8066 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