Jump to content
Server Maintenance This Week. ×

date masks in a edit field on a layout?


J__

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

Recommended Posts

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__

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 )

Link to comment
Share on other sites

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__

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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