Forum Discussion
ChadBrandmire
8 years agoQrew Assistant Captain
Thanks for the reply.
I made a couple of slight changes. But, still can't seem to get this to work. I'm getting a Formula Error
-- Incorrect variable type
The type of the variable does not match the return type of the expression.
I'm having trouble placing where this error is occuring
var number CFD = ToDate([Calculated Finish Date]) - Today();
var number Dur = [Duration];
var number PC = [% Complete] *10;
var text Red = "#FFAEB9";
var text Yellow = "yellow";
var text Orange = "#fda302";
If(
$CFD < 3 and $Dur < 10 and $PC < 50, $Red,
$CFD < 3 and $Dur < 10 and $PC < 70, $Orange,
$CFD < 3 and $Dur < 10 and $PC < 85, $Yellow,
$CFD < 10 and $Dur < 30 and $PC < 50, $Red,
$CFD < 10 and $Dur < 30 and $PC < 70, $Orange,
$CFD < 10 and $Dur < 30 and $PC < 85, $Yellow,
$CFD < 30 and $Dur < 90 and $PC < 50, $Red,
$CFD < 30 and $Dur < 90 and $PC < 70, $Orange,
$CFD < 30 and $Dur < 90 and $PC < 85, $Yellow,
$CFD < 35 and $Dur >90 and $PC < 50, $Red,
$CFD < 35 and $Dur > 90 and $PC < 70, $Orange,
$CFD < 35 and $Dur > 90 and $PC < 85, $Yellow)
I made a couple of slight changes. But, still can't seem to get this to work. I'm getting a Formula Error
-- Incorrect variable type
The type of the variable does not match the return type of the expression.
I'm having trouble placing where this error is occuring
var number CFD = ToDate([Calculated Finish Date]) - Today();
var number Dur = [Duration];
var number PC = [% Complete] *10;
var text Red = "#FFAEB9";
var text Yellow = "yellow";
var text Orange = "#fda302";
If(
$CFD < 3 and $Dur < 10 and $PC < 50, $Red,
$CFD < 3 and $Dur < 10 and $PC < 70, $Orange,
$CFD < 3 and $Dur < 10 and $PC < 85, $Yellow,
$CFD < 10 and $Dur < 30 and $PC < 50, $Red,
$CFD < 10 and $Dur < 30 and $PC < 70, $Orange,
$CFD < 10 and $Dur < 30 and $PC < 85, $Yellow,
$CFD < 30 and $Dur < 90 and $PC < 50, $Red,
$CFD < 30 and $Dur < 90 and $PC < 70, $Orange,
$CFD < 30 and $Dur < 90 and $PC < 85, $Yellow,
$CFD < 35 and $Dur >90 and $PC < 50, $Red,
$CFD < 35 and $Dur > 90 and $PC < 70, $Orange,
$CFD < 35 and $Dur > 90 and $PC < 85, $Yellow)