Objects

Objects

The following Objects are described below:

Cell

Cell

(Object)

Description

Represents a cell's data.

Properties

 

AsOf

AsOf is an integer that refers to the date as of which the value is valid. This property returns the number of days since 1753 until the AsOf date, which can be compared with the today keyword or any other date type parameter

DisplayValue

DisplayValue is a string that represents the cell value as displayed on screen. This means:

For cells of type integer or float - returns the string representation of the number.

For cells of type Text, returns the text (identical to Value attribute)

For cells of type Value List, returns the text of the displayed value

For cells of type Date, returns the date as string in short format (as displayed in Scorecard cells).

Indicator

Indicator represents the cell's indicator, and is comparable to indicators of other cells or to predefined indicator names by using the getIndicator("name") syntax.

ItemID

ItemID returns the internal ID for the item on which the calculation is performed.

UpdatedOn

UpdatedOn is an integer that refers to the date when the cell value was updated. This property returns the number of days since 1753 until the UpdatedOn date, which can be compared with the today keyword or any other date type parameter.

UpdatedBy

UpdatedBy returns the integer id of the user who last updated the cell value. By using UpdatedBy in a function defined on a category of type user, the cells of that category will show the names of the users who last updated the cell object this property refers to.

Value

Value specifies the cell's value according to the category's data type. For more information refer to Functions or discussion on the format of the returned value.

Examples

var a = getCell("2003 Funded Budget").AsOf;

getCell("Risk").Indicator==getCell("Reward").Indicator

getCell("Health").Indicator==getIndicator("Black")

return getCell("Risk").UpdatedBy;

SubItemCell

SubItemCell (Object)

Description

Represents data of a Sub Item and a cell of it.

SubItemCell objects are obtained as the result (list) of getSubItems method.

Properties

All of Cell's properties (refer to the Cell table, above) and the following:

SerialNumber

The order of the sub-item among other sub-items of the same item/portfolio, and of the same type. An integer starting with 1.

SubItemType

The type of the sub-item. This is a value from the Sub-Item Types value list. This is useful for filtering the sub-items of a specific type (corresponding to a specific dynamic list).

Example

var budgetList = getSubItems("Budget 2008");

var totalBudget = 0;

var MILESTONES = getValueList("Sub-Item Type", "Milestones");

 

for (var i = 0; i < budgetList.length; i++)

{

if (budgetList[i].SubItemType == MILESTONES)

totalBudget += budgetList[i].Value;

}

DependencyCell

DependencyCell (Object)

Description

Represents a data of a dependency, and a cell of the depending/supporting item.

DependencyCell objects are obtained as the result (list) of getDependsOnItems and getSupportsItems methods.

Properties

All of Cell's properties (refer to the Cell table, above) and the following:

Cost

The Cost of the dependency. An integer

Type

The Type of the dependency. This is a value from the 'Dependency Types' value list.

Weight

The weight of the dependency. This is the corresponding value from the `Dependency Weights' value list.

Example

// sum of the Costs of all dependencies
var dep = getDependsOnItems("Status");
var sum = 0;
for(var i = 0; i < dep.length; i++)
{
        if (dep[i].Cost != null)
{
sum += dep[i].Cost;
}
}
return sum;

Phase

Phase (Object)

Description

Represents a life cycle's phase.

Properties

ActualEndDate

ActualEndDate is an integer that refers to the date on which the phase ended. This property returns the number of days since 1753 until the actual end date, which can be compared with the today keyword or any other date type parameter.

ActualStartDate

ActualStartDate is an integer that refers to the date on which the phase actually began. This property returns the number of days since 1753 until the actual start date, which can be compared with the today keyword or any other date type parameter.

Deliverables

Deliverables is an array that holds all of the phase's Deliverable objects, refer to the Deliverable table, below. The deliverables in the array are ordered by the deliverable's due date.

ForecastStartDate

ForecastedStartDate is an integer that refers to the Forecasted date on which the selected phase is to start, according to the item plan. This property returns the number of days since 1753 until the Forecasted start date, which can be compared with the today keyword or any other date type parameter

ForecastEndDate

ForecastEndDate is an integer that refers to the forecasted date on which the selected phase is to be completed, according to the item plan. This property returns the number of days since 1753 until the forecasted end date, which can be compared with the today keyword or any other date type parameter.

Health

Health is an integer that specifies the Phase's indicator color (green, yellow, or red).

Name

Name returns the name of the phase. The value type is text string.

PercentComplete

PercentComplete is an integer between 0 and 100 that specifies the percentage of the selected phase that has been completed.

PlannedEndDate

PlannedEndDate is an integer that refers to the scheduled date on which the selected phase is to be completed, according to the item plan. This property returns the number of days since 1753 until the planned end date, which can be compared with the today keyword or any other date type parameter.

PlannedStartDate

PlannedStartDate is an integer that refers to the scheduled date on which the selected phase is to start, according to the item plan. This property returns the number of days since 1753 until the planned start date, which can be compared with the today keyword or any other date type parameter.

Status

Status is a float that represents the phase's status. The status can be one of the following value list entries:

getValueList("PhaseStatus","Not Started")

getValueList("PhaseStatus","Current Phase")

getValueList("PhaseStatus","Finished")

getValueList("PhaseStatus","Skipped")

Weight

Weight is a float that represents the weight of the phase within the "Phases" system value list.

Example

var ph = getPhases();
...
if (ph[i].PlannedStartDate < today) ...

Deliverable

Deliverable (Object)

Description

Represents a Phase's deliverable.

Deliverable objects are obtained as the (list) Deliverables property of a Phase object. Refer to the Phase table, above.

Properties

Completed

  • Completed is a Boolean value that describes whether the deliverable has been completed

Due date

Due date is an integer that refers to the date on which the deliverable is due. This property returns the number of days since 1753 until the due date, which can be compared with the today keyword or any other date type parameter.

Mandatory

Mandatory is a Boolean value that describes whether the deliverable is absolutely required.

Name

Name is a string that is the name of the deliverable.

Example

var ph = getPhases();
...
if (ph[i].Deliverables[j].Completed) ...

Related Topics

Advanced Function Syntax

Methods

Reserved Words



Legal Notices | Your Privacy Rights
Copyright © 1998, 2020

Last Published Thursday, July 9, 2020