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

DateField Auto Calculations?


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

Recommended Posts

Posted

I know this may seem odd to some people, but im trying to get a date field to be quicker for data entry..

Ex instead of typing 01/01/01 as a date you can type 010101 and Auto-Enter an auto enter calculation will format it to a correct date format of 01/01/01.

My Calculated auto entry is:

Case ( Length ( datetest )=6 ;

Date ( Left ( datetest ;2 ) ;Middle ( datetest ; 3 ;2 ) ; Right ( datetest; 2 )

))

Pretty Simple and straightforward... but the problem is I always get errors of wrong date format. Any ideas how to do this?

Posted

Hi

you can't do that in a DATE field.

But you can do in a text field, even better using a custom function like this:

http://www.briandunning.com/cf/373

Posted (edited)

Ive tried that and it works but theres one little issue...

I sort the portal records by date and when the portal is shown, the order isnt correct.

Edited by Guest
Posted

That is because the result of that CF is text ( pseudo_date ) NOT date.

So you need a new calc field, result date, with the calc: GetAsDate ( pseudo_date) and sort by it.

Posted

So in order to make easier data entry, we've needed to store a date in a text field with an auto-enter calc to parse out the entry, then make a date field with a calc that parses out the entry in the text field.

All of this to save the user from typing //...

Posted

So in order to make easier data entry, we've needed to store a date in a text field with an auto-enter calc to parse out the entry, then make a date field with a calc that parses out the entry in the text field.

Yes and no. Yes, Filemaker validates a date field BEFORE applying an auto-entered calculation (unless you are using a custom dialog for the entry). No, you could enter the shorthand into a global text field and have the date field grab it from there AND do the conversion to a date at the same time. Note, however, that it's real easy to get invalid dates into the date field this way (since the auto-entered result is NOT validated).

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