The following tables present reserved words:
- red / yellow / green
- CurrentPhaseIndex
- Prosight.errno/Prosight.message
red / yellow / green
red / yellow / green
|
Syntax
| red
yellow
green
|
Description
| red, yellow, and green are integers that represent specific indicator values. They must be written in lowercase letters.
Note: Use getIndicator("<indicator_color_name>) instead of these legacy reserved words. They are only supported for backward compatibility.
|
Example
| var health = getCell("Health)
if (health.Indicator==red) {return(1);}
if (health.Indicator==yellow) {return(2);}
if (health.Indicator==green) {return(4);}
|
CurrentPhaseIndex
CurrentPhaseIndex
|
Description
| The index for the current phase within the Phases array that is returned by the getPhases method. If no current phase is defined, then the default value for the CurrentPhaseIndex is -1.
|
Example
| var ph = getPhases();
if (CurrentPhaseIndex != -1)
return ph[CurrentPhaseIndex].Name
|
Prosight.errno/Prosight.message
Prosight.errno Prosight.message
|
Syntax
| Prosight.errno = error_level
Prosight.message = "message"
|
Arguments
| error_level One of the numbers 0, -1 or -2
message The text to display as the error message
|
Description
| Use the error object, Prosight.errno, to return an error. 0 is the default for success, -1 returns an error, and -2 returns a warning. Prosight.message returns a string that explains the error, and will be printed in the function log as described in Administration or in the result dialog box of the test button.
Note: When the function returns an error or a warning, the actual value returned is null.
|
Example
| if (getCell("Budget").Value == null)
{
Prosight.errno = -1; //Get out in error
Prosight.message="missing budget";
return;
}
|
Advanced Function Syntax
Methods
Objects