Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script step to 'empty' date field

Featured Replies

  • Newbies

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?

Try SetField(myfield,TextToDate("")))

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

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.