Jump to content
Sign in to follow this  
cmiller

Calculating Elapsed Time "Realtime"

Recommended Posts

I would like to have a calculation that would could calculate elapsed time, so that when x number of minutes pass a conditional format would be applied. So far, the calculations that I have attempted do not keep up with realtime, they perform the elapsed time calculation based on dates and times already in a field.

Any help would be greatly appreciated..

Thanks

Chad

Share this post


Link to post
Share on other sites

Try a condition of:

Get (CurrentTime) - YourTimeField > 60 * x

Note that the formatting will change only when the screen is refreshed.

Share this post


Link to post
Share on other sites

Thanks,

I've actually been using a similur calculation that has worked as you mentioned.

I was hoping there might be a way to apply my conditional formatting, without refreshing the screen. Wasnt sure if there was a plug in or some other way to check the time field against realtime, so that the formatting is applied automatically.

Thanks for your input, I do appreciate your time

Share this post


Link to post
Share on other sites

In version 10, you can install a script to run at a specified interval. In previous versions, you'd need a plugin - or you could run a looped script (though this would preclude any other use of the solution on that workstation). Another option is to use a web viewer running a Javascript.

Share this post


Link to post
Share on other sites

I have considered a looping script, however, this is an Active workstation, so it probablly wouldnt be the best option.

Any idea on how to best implement the webviewer to acheive this goal? That may be the way to go.

In addition, if you are familure with any specific plug in that could do this, I would certainly be willing to look into that as an option.

Thanks again for your time.

Edited by Guest

Share this post


Link to post
Share on other sites

I am afraid my Javascript skills are rather rudimentary. I'd start by searching the web for javascript countdown or egg timer, and adapt one of those. Or you could use an external site - see, for example:

http://www.clocklink.com/gallery.php?category=COUNT

As for plugins, see:

FMbutler DoScript:

http://myfmbutler.com/index.lasso?p=416

EventScript:

http://www.softs4humans.com/

There was also zippScript, but I don't know how you can get a copy today.

Share this post


Link to post
Share on other sites

Thanks for your suggestion and your time. I will research these options and see what I might be able to get going.

Chad

Share this post


Link to post
Share on other sites

I got curious about this myself. Unfortunately, all I could find seemed over-complicated, so I came up with my own:

EggTimer.zip

  • Like 1

Share this post


Link to post
Share on other sites

Thats seems absolutely usable, I really appreciate it. However, I have not had much experience using the webviewer in conjuction with calculations. When the count down time expires, how could I reference that in a calculation, so that I could apply conditional formatting on a seperate field?

Share this post


Link to post
Share on other sites

I am afraid that's not going to work. You see, what happens inside the web viewer is a not an event in Filemaker. You don't need the web viewer in order to know the countdown has expired - you can calculate that directly from the difference between Get (CurrentTime) and StartTime. But still nothing is happening to cause a screen refresh. You can use web viewer here INSTEAD of the conditional formatting - not as a trigger for it.

Share this post


Link to post
Share on other sites

Thanks alot

You have been a tremendous help, and I really do appreciate your time. In fact, I can already see that I have a use of the countdown timer you provided.

Share this post


Link to post
Share on other sites

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

Sign in to follow this  

×

Important Information

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