Skip to main content
Planview Customer Success Center

FindObject Function

FindObject (entityType as ObjectIdentifier, field as Object, fieldValue as Object) as ObjectIdentifier

Category: ObjectReference
Description: Returns an object that fits a specific field value criteria. The EntityType parameter refers to the specific object entity type, for example Project. Field parameter refers to the field of interest, and the fieldValue parameter indicates the value of the specified field. If multiple objects fit the criteria, then the last modified object will be returned.
Supported Context: EmailRule, CustomAction
Parameters:  
entityType as ObjectIdentifier(Class) Represents the entity type of the desired object (i.e Project). You can access all the available entity types using the values denoted in the "Class" option in the "Pick lists" tab of the formula helper
field as Object Represents the field that will be used to find the desired object (i.e. $State)
fieldValue as Object Represents the field value of the field specified in the "field" parameter
Returned value as ObjectIdentifier Returns the object that fits the criteria specified in the "fieldValue" parameter for the field specified in the "field" parameter
Example #1

Create a custom action for the creation of a new expense sheet, where the "Project" field of the expense sheet will be filled in based on the "Activity Number" (a custom field on the project level). Where the "Activity Number" is also a User Input variable within the custom action.

Within the custom action, select the New Object Action and the "Expense Sheet" entity. Click on "Another Field" to add the "Project" field and within enter the following:

FindObject("project", $C_ActivityNumber, ActivityNumber)

Example #2

Another example for the FindObject action is to get field values of this object. For example, using the same expense sheet above, you could enter the description of the expense sheet to match the one of the related project.

For this example, in the expense sheet "description" field enter the following:

FindObject("project", $C_ActivityNumber, ActivityNumber).Description

Note If multiple objects fit the criteria, then the last modified object will be returned.