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.

Auto-Enter Value Based on Date Range

Featured Replies

  • Author

I want to auto-enter a number value based on if a date falls with a specific date range.

For instance, if the date is between July 1, 1980 and June 30, 1990, the value should be $25.00, if the date is between July 1, 1970 and June 30, 1980, the value should be $20.00, etc, etc.

I tried this, but it doesn't seem to work (v_Date is the variable) :

Case ( v_Date ? "7/1/1980" and v_Date ? "6/30/1990", "25.00",

v_Date ? "7/1/1970" and v_Date ? "6/30/1980", "20.00")

Also, does it matter if v_Date is a global field or not?

-Scott

I want to auto-enter a number value based on if a date falls with a specific date range.

For instance, if the date is between July 1, 1980 and June 30, 1990, the value should be $25.00, if the date is between July 1, 1970 and June 30, 1980, the value should be $20.00, etc, etc.

I tried this, but it doesn't seem to work (v_Date is the variable) :

Case ( v_Date ? "7/1/1980" and v_Date ? "6/30/1990", "25.00",

v_Date ? "7/1/1970" and v_Date ? "6/30/1980", "20.00")

Also, does it matter if v_Date is a global field or not?

-Scott

  • Author

I want to auto-enter a number value based on if a date falls with a specific date range.

For instance, if the date is between July 1, 1980 and June 30, 1990, the value should be $25.00, if the date is between July 1, 1970 and June 30, 1980, the value should be $20.00, etc, etc.

I tried this, but it doesn't seem to work (v_Date is the variable) :

Case ( v_Date ? "7/1/1980" and v_Date ? "6/30/1990", "25.00",

v_Date ? "7/1/1970" and v_Date ? "6/30/1980", "20.00")

Also, does it matter if v_Date is a global field or not?

-Scott

Auto enter happens when a record is created. Try making this a calculated field. I assume the ?'s are >= & <=. Also your numbers should not be in quotes and the trailing zeros are unnecessary.

Auto enter happens when a record is created. Try making this a calculated field. I assume the ?'s are >= & <=. Also your numbers should not be in quotes and the trailing zeros are unnecessary.

Auto enter happens when a record is created. Try making this a calculated field. I assume the ?'s are >= & <=. Also your numbers should not be in quotes and the trailing zeros are unnecessary.

  • Author

I eliminated the quotes and made it a calculated field, and it still doesn't work. Any other thoughts?

Also, here's the current calc:

Case ( v_Date >= 7/1/1980 and v_Date <= 6/30/1990, "25",

v_Date >= "7/1/1970" and v_Date <= "6/30/1980", "20" )

-Scott

  • Author

I eliminated the quotes and made it a calculated field, and it still doesn't work. Any other thoughts?

Also, here's the current calc:

Case ( v_Date >= 7/1/1980 and v_Date <= 6/30/1990, "25",

v_Date >= "7/1/1970" and v_Date <= "6/30/1980", "20" )

-Scott

  • Author

I eliminated the quotes and made it a calculated field, and it still doesn't work. Any other thoughts?

Also, here's the current calc:

Case ( v_Date >= 7/1/1980 and v_Date <= 6/30/1990, "25",

v_Date >= "7/1/1970" and v_Date <= "6/30/1980", "20" )

-Scott

Try this.

Case( v_Date >= TextToDate("07/01/1980") and v_Date <= TextToDate("06/30/1990") , 25, v_Date >= TextToDate("07/01/1970") and v_Date <= TextToDate("06/30/1980"), 20)

Try this.

Case( v_Date >= TextToDate("07/01/1980") and v_Date <= TextToDate("06/30/1990") , 25, v_Date >= TextToDate("07/01/1970") and v_Date <= TextToDate("06/30/1980"), 20)

Try this.

Case( v_Date >= TextToDate("07/01/1980") and v_Date <= TextToDate("06/30/1990") , 25, v_Date >= TextToDate("07/01/1970") and v_Date <= TextToDate("06/30/1980"), 20)

Just to note, Date( 7, 1, 1980 ) is more reliable than TextToDate("7/1/1980") since it doesn't rely on system or regional settings.

Just to note, Date( 7, 1, 1980 ) is more reliable than TextToDate("7/1/1980") since it doesn't rely on system or regional settings.

Just to note, Date( 7, 1, 1980 ) is more reliable than TextToDate("7/1/1980") since it doesn't rely on system or regional settings.

  • Author

Yes, that works! The winning calc is as follows:

Case( v_Date >= Date(7,1,1980) and v_Date <= Date(6,30,1990), "25",

v_Date >= Date(7,1,1970) and v_Date <= Date(6,30,1980), "20")

Thanks for all the responses,

-Scott

  • Author

Yes, that works! The winning calc is as follows:

Case( v_Date >= Date(7,1,1980) and v_Date <= Date(6,30,1990), "25",

v_Date >= Date(7,1,1970) and v_Date <= Date(6,30,1980), "20")

Thanks for all the responses,

-Scott

  • Author

Yes, that works! The winning calc is as follows:

Case( v_Date >= Date(7,1,1980) and v_Date <= Date(6,30,1990), "25",

v_Date >= Date(7,1,1970) and v_Date <= Date(6,30,1980), "20")

Thanks for all the responses,

-Scott

Note also that your numeric results need not be in quotes since they are not textual. It will not hurt if they are though.

Note also that your numeric results need not be in quotes since they are not textual. It will not hurt if they are though.

Note also that your numeric results need not be in quotes since they are not textual. It will not hurt if they are though.

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.