Jump 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.

Timed Events in FM 5.5

Featured Replies

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??

  • Author

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!

How does the current time update?

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.

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

You could call either an ActiveX script or an AppleScript. These scripts can keep time then call back to FM when the time is up!

All the best.

Garry

Create an account or sign in to comment

Important Information

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

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.