Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I've made a few simple task trackers where start and stop times are entered manually. However, trying to type 2:30 is a pest as typing the colon slows the process down. I'd prefer to enter 2.30. The layout options for time have a : or . separator option, but as soon as I enter the period it says there's an issue. Is there any workaround or calculation that would allow the entry of a period separator, even if this were calculated/converted to a : somehow?

Posted

The layout options for time have a : or . separator option, but as soon as I enter the period it says there's an issue.

 

The layout layer and its options do not impact the calculation engine, just the display; you can have a time displayed in whatever way you which (e.g. using commas, or even exclamations marks), but first is must be committed using a valid syntax. Also, you can happily enter as many periods as you wish; only when you try to leave (and commit) the field, FM throws an error.

 

Simplest method (without taking into account all possible ramifications, and ignoring error checks for any apocalyptical scenario):

 

Write a script that triggers OnObjectValidate and substitutes periods with colons. You can even chain several substitutions to check for other characters that habitually get into the way, and substitute those, too.

 

Using this script, you can enter your time using any delimiter(s) that you check for; it will be converted to a valid time format with colon(s), committed, then displayed according to your formatting.

 

Be aware that script triggers, too, work on the presentation level; if you need the same functionality on another layout, or for other fields, you need to attach individual trigger events.

Posted

Hi Bob,

 

There are a couple of Demo Files at databasepros.com that also show how this can be done named Text Time and Time Entry here Time

If you are entering current times, you can also use the key combination of Cmd and -

 

HTH

 

Lee

Posted

I do this (for exactly the same reason) with an auto entered Substitute(Self; "."; ":")

Posted

That's great - just what I was looking for. And databasepros.com is a great resource too.

 

I do this (for exactly the same reason) with an auto entered Substitute(Self; "."; ":")

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