AnsweredAssumed Answered

Calculation Help

Question asked by Annette on Feb 13, 2014
Latest reply on Feb 13, 2014 by Annette

Title

Calculation Help

Post

     Hi, 

      

     I have a date field "Date1".  I have a seperate calculation field "Field1Text" which is going to be a difference in the current date and the date in Date1.  

     But,  I'm trying to put a little more in.  I want to say if Date1 is empty then "N/A", if Date1 is greater that the current date then "Future Date", then the difference between the Date1 and current date field otherwise.  

     I have a custom function for age which works great, it's:

     Age ( Birth ; theDate ; Format )

     So when I tried to create a calculation that was just the if blank show N/A otherwise give me the difference and it worked fine.  This was calculation:  If ( IsEmpty (Date1 ); "N/A"; Age (Date1 ; Get ( CurrentDate ) ; 3 ))

     But when I try to add the extra step if date1 is future date it tells me I left something out.  Clearly I've just  written it wrong but not sure how.  

     I have:  If ( IsEmpty (Date1 ); "N/A"; (if (Date1 > Get(CurrentDate) ; "Future date"; Age ( Date1 ; Get ( CurrentDate ) ; 3 ))

      

      

     Help!  lol 

Outcomes