The following tables present reserved words:
- red / yellow / green
- CurrentPhaseIndex
- Prosight.errno/Prosight.message
- DoNothing
The following tables present reserved words:
- red / yellow / green
- CurrentPhaseIndex
- Prosight.errno/Prosight.message
- DoNothing
red / yellow / green
| red / yellow / green | |
| Syntax |
|
| Description |
Note Use
|
| 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 |
|
| Arguments |
|
| 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.
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;
}
|
DoNothing
| DoNothing | |
| Description |
When this keyword is returned from a function, the processing of the function ceases and the cell's data is not updated or added. Note DoNothing is a case-sensitive reserved keyword and can be used only in combination with a Return statement. |
| Example |
var domain = getCell("Domain").Value;
var application = getValueList("Domains", "Applications");
var assets = getValueList("Domains", "Assets");
if (domain == application) return "APPLICATIONS";
if (domain == assets) return "ASSETS";
return DoNothing;
|