timsea

Starter Solution: Projects - Days Elapsed

Discussion created by timsea on Feb 5, 2014
Latest reply on Feb 5, 2014 by erolst

Hello,

 

I'm just beginning with scripts and calculations, just purchased FMP Advanced, and had a script question and a referral question, please.

 

Question 1: I'm using the 'Projects' Starter Solution, and noticed that the 'Days Elapsed' uses the GetWorkDays function, where I'd like the elapsed days to include weekends. How could this be rewritten to include weekends? (this is the existing calculation from the Starter Solution)

 

Let (
[
today = Get ( CurrentDate ) ;
no task = Count ( Tasks::TASK ID MATCH FIELD ) = 0 ;

yet = Start Date ≤ today
and
Due Date ≥ today ;

future = Start Date ≥ today
and
Due Date ≥ today ;

active days = GetWorkDays ( Start Date ; today ) ;
completed days = GetWorkDays ( Start Date ; Due Date )
] ;

Case (
no task ; 0 ;
yet ; active days ;
future ; 0 ;
completed days
)
)

 

Question 2: What, in your opinion, is the BEST reference material (book, video, manual, etc.) for learning calculations, scripts, and how to use functions, for a beginner? Would appreciate your expert opinions, to focus on the best material.

 

Thank you, very much!

Tim

Outcomes