ajayz

Case calculation help

Discussion created by ajayz on Jan 30, 2018
Latest reply on Jan 31, 2018 by FredoMkb

Hi,

I have a database which has a field called (StructuralRating) which is a number between 1 to 5

 

If the number is 1 - the calculated result is field (Inspection_Date) + 4 Years

if the number is 2 - the calculated result is field (Inspection_Date) + 2 Years

if the number is 3 - the calculated result is field (Inspection_Date) + 6 Month

if the number is 4 - the calculated result is field (Inspection_Date) + 4 weeks

if the number is 5 - the calculated result left blank

 

I did try the following but I couldn't get it to work with a calculated field:

Case (

StructuralRating = 1; Date (Month ( Inspection_Date ); Day ( Inspection_Date ); Year ( Inspection_Date)  + 4;

StructuralRating = 2; Date (Month ( Inspection_Date ); Day ( Inspection_Date ); Year ( Inspection_Date)  + 2;

StructuralRating = 3; Date (Month ( Inspection_Date )+ 6; Day ( Inspection_Date ); Year ( Inspection_Date );

StructuralRating = 4; Date (Month ( Inspection_Date); Day ( Inspection_Date ) + 28 ; Year ( Inspection_Date );

)

However, I kept getting the error message - "There are too many parameters in this function"

Outcomes