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

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

Recommended Posts

Posted

Hi there. I'm building a real-time sign in database with a web interface. I know that FM timestamps things when you want it to, but what I'm looking to do is have a real-time (actually counting the minets and seconds) clock that alerts me when 20 minuets have passed. I know it's already possible w/ javascript, but I need the event noted in the database after 20 minuets. Anyone have any ideas??

Posted

I never got the real time clock thingie, but I did get the timed event to work with a timestamp. I'm documenting it if there is anyone who would like to know how I did it.

First of all, I have three fields: timestart(time field), elapsed_time(calculation field) and times_up(calculation field).

Timestart is just a field that stamps the time that starts a tutoring session with whatever time they start.

elapsed_time was a little more tricky as I was using the status(currenttime) function. So the calculation looked like this:

status(currenttime) - timestart

and the times_up field validates the time after 20 minuets have elapsed. So it looks like this:

If(elapsed_time >= Time( 00 , 20 , 00 ),"Times UP!","")

I hope I helped anyone who is working on anything similar or having problems doing the same thing.

I'd like to hear from anyone who's built a real working clock with FM. Thanks!

Posted

First, set up the elapsed_time field storage not to store results.

Then, you have to click in the field.

OR...

Another way is to create a script that:

Pauses for 20 minutes

Puts up an alert (perhaps "Show Message"?)

The problem here is if you run other scripts during the 20-minute time period. Then you're pretty much hosed.

Posted

quote:

Originally posted by danjacoby:

First, set up the elapsed_time field storage not to store results.

Then, you have to click in the field.

OR...

Another way is to create a script that:

Pauses for 20 minutes

Puts up an alert (perhaps "Show Message"?)

The problem here is if you run other scripts during the 20-minute time period. Then you're pretty much hosed.

There's no problems with other script running, off course if you don't have an other script that contain Pause for ever step, just select option "resume current script" to buttons that trigger them. If you select script from menu the problem is not arrising

And of course you will need to modify a little bit the script that Dan gave you to something like this:

Script "Start"

set field [startTime, StatusCurrentTime]

performScript "Wait"

script "Wait"

setField [waitFor,endTime-StatusCurenTime]

PauseResumeScript[value from field waitFor]

If [statusCurrentTime<endTime]

PerformScript "Wait"

else

ShowMessage"Time is up!"

end if

where

startTime,waitFor are global time fields

endTime is calculation startTime+20minutes or whatever

HTH

Dj

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