Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8066 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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?

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.