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

date masks in a edit field on a layout?


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

Recommended Posts

Posted

Hi,

I would like to display a field which contains something like [ / / ]

for a date. so then all i have to do is type 102404 and the date is 10/24/04.

I know I can validate this after the fact and check to see if / / are there, but what about in the field displaing slashes before the user goes in the field?

thanks for your help in advance,

sincererly,

J__

Posted

Since you are using FMP 7 you might be able to take advantage of the new autoenter calculation feature. One of the things it can do is manipulate data entered into the field.

Posted

Vaughan is correct. However, your field will have to be a text field, as MMDDYY is not a valid FM date format. You can use an auto-enter calculation with 'Do not replace existing value' deselected. Left( field; 2 ) & "/" & Middle( field; 3; 2 ) & "/" & Right( field; 2 )

Posted

Thanks guys, I really appreciate it.

I just want a standard / / when you tab into the field.

then be able to type in each section. But it does need to be a date field in the end.

any additional suggestions?

thanks,

Sincerely,

J__

Posted

I think you're going to need two fields still, due to the format being invalid for a date field.

Posted

You could auto-enter a (fake) date, like 01/01/01, and allow user-override. At least you've got a date field and the slashes...

Posted

Why not just put a button next to the field, and use the Insert Current Date Script Step?

Lee

smirk.gif

Posted

It's a lot to go through to get what you want but here's an idea.

Create a text field for this data without slashes. Add it to a layout and make it editable.. Create another field as a calculation that displays the data with the slashes (that's the Left/Middle/Right equation mentioned earlier). Place this field over your original text field but do not alow entry. Now when people enter this field they will be editing the text field and just type the numbers. When they move on the data is displayed with the slashes.

But if you want to use this data as a date (and, as Queue says, it is the wrong format) you'll need yet another calc field that returns a date to parse it into the right order.. I think that's the Date function...

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