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

Set Date Field to Blank Using Set Field Script


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

Recommended Posts

Can I use the Set Field script step to set a date field to blank? For example, I have a field called birthDate defined as a date field. The field is populated for the current record with a date of 1/1/2002. If I want to remove the date so that the field is no longer populated with data, how would I do this using the Set Field script step? If I specify that the Set Field script step use quotes ("") as its result, the field is then populated with an invalid date. The technique of using quotes ("") with no data between the quotes works with text and number fields.

Link to comment
Share on other sites

If you use SetField"" with date fields you will get a "?" for an invalid date. Using SetField"" with time will give you a time of 0:00:00. SetField relies on the format being the same as the destination field (steps like InsertCalculatedResult don't - so use them for inserting dates ranges into fields for scripted Finds.)

You can use the Clear script step for both date and time but the field needs to be on the current layout for this to work.

To use SetField for date and time, use these steps:

SetField["Date", "TextToDate("")"]

SetField ["Time", "TextToTime("")"]

Link to comment
Share on other sites

This topic is 8193 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.