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

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

Recommended Posts

Posted

We are running FileMaker Pro 6 on OS9, OSX, Win2k and WinXP systems. FM Server 5.5 is running all the files on OSX.

I need a script written that can take today's date (or an input date, if entered), check the specified number of delivery days, and calculate the actual delivery date. The problem is that the calculation will have to skip Saturdays, Sundays and national holidays (I will input national holidays somewhere else manually, into whatever type of field is appropriate).

I can provide more information as needed, but let me point out I am willing to pay for this. It is not that difficult, but I just do not have time to fiddle in an app I am not that familiar with. I am thinking of something like a $25 retainer and $25 on completion, and if you take PayPal that would be perfect.

If this is something you can handle (no outstanding hurry) please write me here, where everyone can see your name, which should help keep the scam artists away.

If anyone needs more information right now ask here, or offlist.

Thank you.

=====

Edward Lipsett

Fukuoka, Japan

elipsett @ intercomltd.com

Posted

Yes, I'd say that helps quite a bit.

I haven't actually looked at what you did yet, but it provides the right results and I can get to the actual code, which is enough. With your "Add n Days" script it will be easy enough to adapt it to my existing dbs.

You just earned $50... if you'll tell me where to send it, I'll be happy to pay up!

Posted

I wouldn't be comfortable accepting payment for answering a question in these forums. But I know of a good cause that could benefit from your contribution - I will contact you privately about that.

Posted (edited)

I seem to have found a bug... if the input date is, for example, April 28 (a Saturday), and the delivery time is one day, it returns May 2 instead of May 1.

And I may have found why... the ExitLoopIf statement reads:

=====

gCounter ? 0

and

Mod( EndDate - 1 , 7 ) < 5

and

not Holidays::cCount

=====

What is the character after "gCounter"?

Edited by Guest
Posted

It's a feature, not a bug. If StartDate itself is not a workday, the count starts from the first upcoming workday. Therefore April 28 + 0 days will return May 1.

The logic being that if 1 workday needs to elapse, the delivery cannot be earlier than May 2. If this is not the desired behavior, you will need to provide an alternative specification.

---

The character there should be 'less or equal'.

Posted

OK, I see the logic there.

Zero days should mean the same day, but since the initial day is Sat, the 0th day is May 1, and therefore the 1st day is May 2.

Works.

Let me try the <= symbol now...

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