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.

Finding Monday's Data on Friday

Featured Replies

Hi folks. I currently have a script that finds whatever it is I'm looking for - the following day - just fine using:

Get( CurrentDate ) + 1

The problem is two-fold: #1 - I want it to be more intuitive, and react based on the day it is today. Since we only have data for Monday-Friday, I want it to be able to find Monday's data on Friday. This, of course, can be done by using the following command on Friday:

Get( CurrentDate ) + 3

However #2 - I want it to pick the appropriate day and "+" number based on what day today is. Does this make sense? In other words, I want a case function that will recognize that if today (the day on which we are searching) is Sunday thru Thursday, it'll use "Get( CurrentDate ) + 1"; if it's Friday it'll use "Get( CurrentDate ) + 3"; if it's Saturday it'll use "Get( CurrentDate ) + 2".

Here's the code I came up with, which doesn't work:

Case (

DayOfWeek(//) = 6 ;

Get ( CurrentDate ) + 3 ;

DayOfWeek(//) = 7 ;

Get ( CurrentDate ) + 2 ;

Get ( CurrentDate ) + 1

)

Can someone help me fix this?

Thank you so much!

  • Author

Figured it out...here's what the corrected script code is:

Case (

DayName(Get ( CurrentDate )) = "Friday" ;

Get ( CurrentDate ) + 3 ;

DayName(Get ( CurrentDate )) = "Saturday" ;

Get ( CurrentDate ) + 2 ;

Get ( CurrentDate ) + 1

)

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.