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 by Time

Featured Replies

I have a schedule button that goes to the schedule layout. I'd like the button to do a search and return only the results for today if it is before 6:00 pm and for tomorrow if it is after 6:00 pm.

Is there an IF function I can use for this?

Just to clarify, I mean 6:00 pm actual time right now not the appointment times. Something like If (system time < 6:00 pm ; find date // ; // +1)

Edited by Guest

Set Variable[ $now ; Get(CurrentTime) ]

Set Variable[ $today ; Get( CurrentDate ) ]

Set Variable[ $dateWanted ; Case( $now < Time(18;0;0) ; $today ; $today + 1 ) ]

Perform Find( $dateWanted ) // using variable in Find requires FM11

Today will start at 12 am, does that work for you?

Also you may want to use Get(CurrentHostTimestamp) if it's a hosted solution.

  • Author

Thanks so much for the help.

I think I'm almost there. The last part when you perform the find...it says the provided find criteria is not valid when I run the script because I had it correlate the search field with the date field.

When I create the find criteria it says "Find records when:" and then I have to pick a field that correlates with the criteria. $dateWanted is not one of the fields I can correlate to so I had it correlate to the date.

how can I get around this?

What is the name and field type of the field you are searching?

Does this work for you?

Today.zip

  • Author

s_date, Date format, indexed

How are you determining the Times, do you have a time field also?

Lee

  • Author

Yes I have a time field that says when the appointment is. But all I need is for it to show the correct date which it looks like what you gave me works great! I'll let you know if different.

Thanks so much for the help! I've learned a lot with you.

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.