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

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

Recommended Posts

Posted

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.

Posted

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("")"]

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