May 2, 200223 yr 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.
May 3, 200223 yr 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("")"]
Create an account or sign in to comment