AnsweredAssumed Answered

How to exclude weekend days from a 5-day report?

Question asked by Xaqtly on Feb 24, 2010
Latest reply on Feb 25, 2010 by Xaqtly

Title

How to exclude weekend days from a 5-day report?

Post

I'm trying to create a script that goes to a specific layout, does a search using today's date then exports the results to an email. Then I want it to do the same thing for the next 4 working days, so if I run it on Tuesday I want it to get results for Tuesday, Wednesday, Thursday, Friday and then next Monday. The line I'm using to do the search goes like this:

 

 

 

Insert Calculated Result [ Elements05:: Date 3 Item Due; Get ( CurrentDate ) ]

 

So I enter Find Mode, that line inserts the current date into the date field, and then it performs the find and emails the results. That part works fine. Then I can duplicate that line and change it so that it says this:

 

 

Insert Calculated Result [ Elements05:: Date 3 Item Due; Get ( CurrentDate ) + 1 ]

 

to get the results for the next day, and that works fine too. And same with adding + 2, and so on. What I haven't been able to figure out is how to get it to skip weekend days. If it's Thursday and I run the + 2 line, it will return results for Saturday, but what I want is for it to return results from the next Monday. I'm not good at calculations in FMP, so I was hoping somebody could point me in the right direction. Looking through help hasn't really given me any ideas, only explanations of other functions like DayOfWeek that might come in handy. Any ideas?  Thanks for any advice.

 

 I forgot to add my details; I'm using Filemaker Pro 10 in OS X 10.6.2.

Outcomes