Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

hi gang-have a question here regarding preferred method to do an autocalc in a date field when a new record is made.

I have an incident report database for a venue client (stadium). They have 12 events per year. I would like the field "Incident Date" in the db to autocalc to the nearest but not greater than event date. I've tried using a nested if statement but results have been, well, weird. I can post the statement for scrutinizing but before I do that would like to throw this out there in case someone else had done this and used a different tack. The calculation is pretty long, which is probably part of the problem, and I'd like to avoid the eyestrain if possible.

I did think I might use a startup script to set a global with a simpler or more logical calculation, then autocalc the date field with the global result. Anyone have any other ideas?

thanks in advance -

T

Posted

Are the incident dates similar? Are they all on a particular day of the month? What are the dates?

Posted

12 dates, mostly Sunday, some Thursday and Monday, through the end of January. Basically, it's a football team's schedule.

I'm thinking I might- instead of using >= , specify a range instead, and am going to try that now.

T

Posted

If you have all the dates in another table, you could use the LookupNext function.

Awesome, That one never occured to me. Yes, the dates are in another table. Perfect! Thanks so much!

Tony

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