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

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

Recommended Posts

Posted

Hi,

I am trying to make a splash screen that will display the user name, a greeting, maybe a picture and a message...

I am trying to use a calculation like this:

Case ( Get(CurrentTime) > Time (4;0;0) and Get(CurrentTime) < 16;0;0); "Good afternoon"

And it works, but when it gets within the hour it doesn't work. In other words as soon as I get within the hour of the late parameter, it doesn't work. What am I doing wrong?

And how can I do this with a username? Is there a Get(currentuser) type of calculation? I want to do it based off of the user log in (for us it is an id number)

I thought this would be easy, but I guess nothing ever is. Or I am just dumb...

Vandy

Posted

Try this example. If you take a look at the script it'll make sense how everything works.

Login as "Vandy", the password is "password"

Have fun!

splash.zip

Posted

Vandy->

If I'm reading the problem right, the Time ( 16 ; 0 ; 0 ) needs to be Time ( 16 ; 59 ; 59 ) to catch all times from 4PM but less than 5PM.

Posted

Kent->

You posted while I was composing mine! Your splash example's calc has an issue (I'm sure this is an oversight, since it's late in the day)???

Case ( Get ( CurrentTime ) < 12 ; "Good Morning" ;

Get ( CurrentTime ) < 18 ; "Good Afternoon" ;

"Good Evening" )

The 18 will be interpreted as 18 seconds, not 18 hours. The 18 needs to be either Time ( 18 ; 0 ; 0 ) or expressed in seconds (18*3600).

Posted

Filemaker time is the number oof seconds elapsed since midnight. Therefore your calculation:

Case (

Get ( CurrentTime ) < 12 ; "Good Morning" ;

Get ( CurrentTime ) < 18 ; "Good Afternoon" ;

"Good Evening" )

will return "Good Morning" in the first 12 seconds after midnight, "Good Afternoon" in the following 6 seconds, and "Good Evening" for the rest of the day.

Since Vandy does not seem to be interested in minutes and seconds, you can get the desired result by:

Let (

H = Hour ( Get (CurrentTime) ) ;

Case (

H < 12; "Good Morning" ;

H < 18 ; "Good Afternoon" ;

"Good Evening"

)

)

This topic is 6971 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.