Custom Fields
An entity in Targetprocess may have multiple custom fields - up to 100 actually. Here we'll describe how to refer to custom field values in formulas used for Custom Formula Metrics and Calculated Custom Fields.
Inherit Custom Field values from an entity itself
Custom Formula Metrics:
Custom fields have various types. Custom formula metrics can extract values from fields of the following types:
- Text
- Number
- Date
- Boolean
- Entity
Access to custom field values is different for Metrics and Calculated Custom Fields
In formulas of Calculated Custom Fields to get value of Custom Field "Field Name" use:
FieldName
In formulas for Metrics to get value of Custom Field "Field Name" use:
CustomValues.Text("Field Name")
CustomValues.Number("Field Name")
CustomValues.Date("Field Name")
CustomValues.Boolean("Field Name")
Type of an extracted value is determined automatically. There is no need to specify it manually. You just use name of the field. If a field name has spaces, skip them in your formulas.
Entity Types | Custom Formula | Result Type | Result |
---|---|---|---|
Any | FieldName CustomValues.Text("Field Name") | Text* | Value of Text custom field with name "Field Name" |
Any | FieldName CustomValues.Number("Field Name") | Number* | Value of Number custom field with name "Field Name" |
Any | FieldName CustomValues.Date("Field Name") | Date* | Value of Date custom field with name "Field Name" |
Any | FieldName CustomValues.Boolean("Field Name") | Boolean* | Value of Check Box custom field with name "Field Name" |
Any | CustomValues.Entity("Field Name").ID | Number | ID of an entity set to a Targetprocess Entity custom field with name "Field Name" |
Any | CustomValues.Entity("Field Name").Name | Text | Name of an entity set to a Targetprocess Entity custom field with name "Field Name" |
Inherit Custom Field values from parent entity
Besides references to fields at own level entities can inherit custom field values from parent entities. Say a User Story, which is a most common entity type in Targetprocess, can inherit custom field values from parent entities: Features, Epics, Projects, etc. Same formulas are valid for other entity types such as Bugs, Tasks.
Any Custom Field type is supported
The examples below use CustomValues.Number field type as most frequently used one. Other types such as Text, Date, Boolean, Entity are fully supported in the formulas as well.
Entity Types | Custom Formula | Result |
---|---|---|
User Story Bug | Feature.FieldName Feature.CustomValues.Number("Field Name") | Value of Custom Field named "Field Name" of parent Feature |
User Story Bug | Feature.Epic.FieldName Feature.Epic.CustomValues.Number("Field Name") | Value of Custom Field named "Field Name" of parent Epic |
Task Bug | UserStory.FieldName UserStory.CustomValues.Number("Field Name") | Value of Custom Field named "Field Name" of parent User Story |
Task Bug | UserStory.Feature.FieldName UserStory.Feature.CustomValues.Number("Field Name") | Value of Custom Field named "Field Name" of parent Feature |
Task Bug | UserStory.Feature.Epic.FieldName UserStory.Feature.Epic.CustomValues.Number("Field Name") | Value of Custom Field named "Field Name" of parent Epic |
Feature | Epic.FieldName Epic.CustomValues.Number("Field Name") | Value of Custom Field named "Field Name" of parent Epic |
User Story Bug Task Feature Epic Request | Project.FieldName Project.CustomValues.Number("Field Name") | Value of Custom Field named "Field Name" of parent Project |
Updated about 6 years ago