Jump 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.

Help with clearing fields

Featured Replies

Here is what I want to have happen. If 9/15/02 is entered into the PromoStartDate field and 9/26/02 is entered into the PromoStopDate field, on 9/27/02 I want both fields to be

It looks like your Case calculations are set up to populate the field, but do not have another that will empty the fields. So they get populated but never emptied. You need an extra Case option in each statement that tests if StopDate is less than CurrentDate, and if so the action is "" (to clear the field.

Steve Brown

  • Author

Steve,

Where in the calculation does the new case option go? Would you add it to the actual calculation...

Thanks,

HJ

With a Case function, you need to place your criterion, then a comma, then the result, then a comma, then the next criterion, etc. It looks like your statements need three criteria each. I'll list them vertically, followed by desired result:

IsEmpty(PromoStopDate), PromoStartDate

PromoStopDate + 1 > Status( CurrentDate), PromoStartDate

PromoStopDate < Status( CurrentDate), ""

The first two you combined with an "or". But the third is missing altogether. This one will clear the field if the StopDate is earlier than the current date. Also, if you combine the first two with an "or", then it looks like you are setting up an If statement, not a Case, i.e., If (criteria A), then Result A, else Result B. I'd say try rewriting your Case as three situations like this (I'll just do your first one)B)

Case(IsEmpty(PromoStopDate), PromoStartDate, PromoStopDate + 1 > Status( CurrentDate), PromoStartDate, PromoStopDate < Status( CurrentDate), "")

In doing elaborate statements like this, it is conventional to insert hard returns and leading spaces to make then easier to read (within the calculation dialog box). FM will pay no attention to these. So we could make your Case look like this:

Case(IsEmpty(PromoStopDate), PromoStartDate,

PromoStopDate + 1 > Status( CurrentDate), PromoStartDate,

PromoStopDate < Status( CurrentDate), "")

Now it should be easier to see what is happening.

Steve Brown

Create an account or sign in to comment

Important Information

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

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.