Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5202 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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
Posted

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.

Posted

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?

Posted

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.

This topic is 5202 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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