Jump to content

Error's when searching for dates


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

Recommended Posts

Lo' again all,

I've updated my attendance file and its scripting. Its a little more manageable now. There are two ways that a user could input invalid or incorrect data when doing date range searches. They could search for a date range yields a zero found count (e.g. error = 401), or they could mess up and use the incorrect number of days for a given month (e.g. they could do a search on the range: 1/1/2003...1/31/2003). When i am doing a manual find and i place that in my date field (dateAttendance) it pops up the "The date in this field must be a valid date..." message. This is an acceptable and understandable function. However, when i script my date range search, it performs a find without informing the user of any errors.

I have my script set up to catch errors and i have steps that look for error 401 and deal with it appropriately. However, i don't know how to have it catch errors of the second type, (i.e. the user says there are more days in this month than there actually are "11/31/year").

I am attaching a stripped down version of my attendance module. Thanks in advance for reading and helping (past, present, and future).

modules.zip

Link to comment
Share on other sites

The fact that the date is being put together with a calculation behind the scenes makes it harder to get an error message for bad dates. It's a good interface however.

You can use the fact that the calculation date field is indeed empty when what you've chosen resolves to 11/31/2003.

I modified your script to take advantage of that, kicking up an error message right there on the layout, re-entering the Find/pause script again.

I also changed the Copy/paste routine to an Insert Calculated Result. It's just my preference, but I never use Copy/paste unless I have to. It's less steps, and doesn't wipe out their clipboard. The field still has to be on the layout though.

modules.zip

Link to comment
Share on other sites

Fenton,

Thanks tons. I really am a newbie developer. I have recently implemented the development standards put together by CoreSolutions and though i have many tools to debug my database problems, I have not had enough experience with filemaker to really know what to look for and where to look for it. Thanks for your help! You've taught me something that i hope i can use in the future.

Link to comment
Share on other sites

This topic is 6601 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.