Reserved Words

The following tables present reserved words:

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;
}

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;

Related Topics

Advanced Function Syntax

Methods

Objects



Legal Notices | Your Privacy Rights
Copyright © 1998, 2024

Last Published Tuesday, November 19, 2024