Jump to content

Validating Year in a date field


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

Recommended Posts

Looking through the threads I've seen this asked in similar ways so forgive this question. I have a field where I want the user to enter the "year" only. Not "2/21/2003". I tried formating the fields to show only the year, but fm asks for the user to enter the complete date. I could set the field as a number or date field, but I'm afraid that might cause validation problems down the road when I'll have to sort on the field. Is there a message box that could be used to prompt the user? I'm very new to fm and would appreciate any guidence on this issue.

Link to comment
Share on other sites

I would recommend a Text field instead. That way you can easily use the TexttoDate function to convert it to a date (part of anyway) if need in the future. Otherwise you would have to first convert it to text and then to date.

Lee

Link to comment
Share on other sites

Hi Tmonk,

It appears as though you are trying to 'foolproof' your data entry for the user... always an important issue when designing a good user interface. You could do this a number of ways...

- a date field with 'validation' to verify as a legal entry

- separate fields (text or number) for day, month, year... use a calculation to combine into a final date field

- pull-down menus with only the appropriate items (text or number) as a choice... use a calculation to combine into a final date field

- create a 'datelist' file with only available dates to choose from... then a relation to display those dates

As you can see... you are only limited by your imagination as to how to apply a solution to your issue. The list above gives you some ideas... there are many more. The ideas I've listed above include basic interface & simple implementation as well as complex implementations and highly functional interface designs.

As a new FMP developer, I would recommend starting with a simple solutions first, then 'challenge' yourself to learn how to apply the other ideas to your issue... you will amaze yourself as you learn new tricks and ways to accomplish things within FileMaker.

Let me know if you need help... I could create a simple sample file to show you a few of the ideas above.

Good Luck!

Bob Kundinger

[email protected]

Link to comment
Share on other sites

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