***
You can expand your reporting capabilities by using text mode in reports and report elements.
For more information about text mode, see "Understanding Text Mode."
Outside of creating custom prompts which can only be configured using text mode, we recommend that you use the report builder to build your views, filters and groupings. However, there are some instances where you can use text mode to enhance your reports.
For information about building custom prompts, see "Working with Prompts."
You can also use text mode to build custom calculated custom fields in a custom form.
For more information about calculated custom fields, see "Using Calculated Custom Data."
Consider the following instances where you would use text mode instead of the standard interface:
- Using Text Mode in Calculated Custom Fields
- Using Text Mode in Views
- Using Text Mode in Filters
- Using Text Mode in Groupings
- Examples of Views, Filters and Groupings Built in Text Mode
Using Text Mode in Calculated Custom Fields
You can use text mode to add a Calculated Custom Field to a Custom Form.
For more information about adding a Calculated Custom Field to a Custom Form, see "Creating Custom Forms."
For example, you can add a Calculated Custom Field that shows a time and date stamp of the moment when an item was marked as In Progress. You can use this calculation for other statuses.
Displaying a Status Time Stamp in a Custom Form
- Navigate to a Custom form where you want to add the field.
- Add a Calculated Custom Field to the form.
- Specify a Label for the Custom Field, for example: Status Timestamp Custom Field.
- Click Save+Close.
- Re-open the Custom Form, and select the new Status Timestamp Custom Field.
- In the Calculation field, specify the following calculation for your Custom Field:
IF(Status='INP',IF(ISBLANK({DE:Status Timestamp Custom Field}),$$NOW,{DE:Status Timestamp Custom Field}),{DE:Status Timestamp Custom Field})
NOTE You must always use the three letter key for the Status in this calculation.
For more information about the keys for Statuses, see "Creating and Customizing Statuses in Workfront." - Click Save+Close.
You can then report on the Status Timestamp Custom Field, or use it in other calculations in reports or Custom Fields.
NOTE that if your status changes to INP, then another status, then back to INP, only the timestamp of the first change to INP will be captured.
You can use text mode in views to expand on the fields and objects you can display in the view.
The most common reasons for using text mode in a view are:
- Displaying Objects That Are Not Included in the Standard Interface
- Making a Calculation between Two Fields in a Column
- Editing the Width of a Column Permanently
- Merging Multiple Columns into a Single Column
- Removing a Link to an Object from the View
- Displaying a Collection in a View
- Hiding a Column in a View
- Displaying an Image in a View
- Displaying Task Indentations in a View
- Calculating Time and Date Differences
Displaying Objects That Are Not Included in the Standard Interface
You can display objects in a view that are not included in the standard mode interface. Some objects can be included in a view only by referencing them via text mode.
You can know which fields can be included in a view in either of the following ways:
- Use the "API Explorer" to discover other objects that can be referenced via text mode.
Not all the fields documented in the API Explorer are valid fields for text mode. Some fields are only reportable through the API. - A column or field name is not available in the standard mode interface, but the column or field ID is. Most objects that have a column or field ID also have a corresponding column or field name. However, in some cases, only the ID is displayed in the standard mode Interface. You can use text mode to include the column or field name in a view by replacing the fieldnameID with the fieldname:name.
For example, in the standard mode interface, the Sponsor ID field is available for a project, but the Sponsor Name field is not. You can use text mode to display the Sponsor Name, if you switch the Sponsor ID column to text mode and replace the text in the column with:
valuefield=project:sponsor:name
querysort=project:sponsor:name
valueformat=HTML
displayname=Project Sponsor Name
linkedname=project
namekey=view.relatedcolumn
namekeyargkey.0=project
namekeyargkey.1=sponsorID
Making a Calculation between Two Fields in a Column
For example, if you want to find out the number of week days that elapsed between two dates, you can use text mode syntax and data expressions to calculate this difference.
For example, we want to calculate the week day difference between the Planned Completion Date and the Actual Completion Date of a task.
To do this, you can add a new column to a task view, and Switch to Text Mode. In the Click to edit text dialog box, paste the following text:
displayname=Week Day Difference
textmode=true
valueexpression=WEEKDAYDIFF({plannedCompletionDate},{actualCompletionDate})
valueformat=HTML
You can use any other two dates in this calculation (Actual Start, Actual Completion, Projected Start, Projected Completion, etc).
For more information about calculated data expressions, see "Understanding Calculated Data Expressions."
Editing the Width of a Column Permanently
You can permanently change the width of a column by using these lines in the text mode of the column:
width=200
usewidths=true
For the width line, specify any number (in pixels), depending on how wide you want the column to display in the report.
For information about using text mode in a view, see the "Editing Text Mode in a View" section in the "Understanding Text Mode" article.
NOTE The usewidths=true line is mandatory in all columns, except for project and tasks lists in the following tabs:
- Projects I'm On
- Projects I Own
- All projects
- Projects tab at the Portfolio level
- Projects tab at the Program level
- Tasks tab at the Project level
- Subtasks tab at the Task level
Merging Multiple Columns into a Single Column
You can share the data from multiple columns to display it in one column, by adding a third column between them. The added middle column should have the following code in text mode:
value=
valueformat=HTML
width=1
sharecol=true
You also have to add the following text to the first column:
sharecol=true
NOTE The valueformat=HTML line is mandatory in a shared column. Otherwise, the columns will contain no information (they will be blank) when the report is exported from Workfront.
Removing a Link to an Object from the View
Some objects that you display in a view are links to the Details page of the object, by default. For example, the column that displays the Name of a project is a link to the project; the column that displays the Name of a user is a link to the user profile page.
You can remove this link using text mode.
For example, to remove the link to a task in a project report, you may use the following text mode in a column:
displayname=Task Name
linkedname=direct
namekey=name
querysort=name
textmode=true
valueexpression={name}
valueformat=Compound
NOTE You can use similar code for other objects, and just replace the valuefield line of the code with valueexpression. This will remove the link from the view.
Displaying a Collection in a View
Display a collection in a report view. A collection is a list of objects that are linked to one other object.
For more information about displaying a collection in a report view, see "Referencing a Collection in a Report."
You can build a column in a view for purposes of sorting the view by a certain field, but you can use text mode to hide the information inside the column from displaying in the view. In this case, the object in the column helps sort the view, but the information of that object does not display in the view.
For example, to hide the Task Number column in a task report, replace the text in the Task Number column with the following:
displayname=
linkedname=direct
querysort=taskNumber
sortOrder=1
sortType=asc
textmode=true
value=
valueformat=int
width=0
The important changes in this code which make the column hidden are:
- displayname: this line must be blank;
- valuefield: this has been replaced by value, and must be blank;
- width=0
NOTES:
- You can use hidden columns to sort by a certain object that you do not want to display in the view.
For example, you can sort by Task Number in a task view in the example provided above, and hide the Task Number information from the view. - When you hide a column, note that the information in the column is hidden, but the column still exists in the view.
You can replace the name of an object in a view with an image.
NOTE Images appear in their actual resolution so try to use small images. This example is for projects, but applies to any object with a URL field. You can add it to any column to replace the value of the column with an image.
To replace the name of a project in a project view with an image:
- Ensure that you have an image that is stored on a server accessible from Workfront. Ideally, the image is uploaded directly into Workfront.
- Navigate to a project, then click Edit Project.
- In the URL field, add the link to the image.
- Navigate to a project view in a list or report and customize the view.
- Click the header of the column for the Project Name, then click Switch to Text Mode.
- Add the following code to the column to the existing code:
displayname=Link Project
The image you selected replaces the Project Name in the project view.
image.name=Link Project
image.valuefield=URL
link.linkproperty.0.name=projectID
link.linkproperty.0.value=ID
link.lookup=link.edit
link.page=/view
link.valuefield=objCode
link.valueformat=val
textmode=true
type=image
valueformat= - Click Save View.
Displaying Task Indentations in a View
Add this code to the Task Name column in a task view, to display the tasks indented according to the Work Breakdown Structure of the project:
valueexpression=IF({indent}<1,{name},IF({indent}<2,CONCAT(" - ",{name}),IF({indent}<3,CONCAT(" - - ",{name}),IF({indent}<4,CONCAT(" - - - ",{name}),CONCAT(" - - - - ",{name})))))
This adds up to four dashes before the task name to indicate the position of the child task.
Calculating Time and Date Differences
IMPORTANT You cannot calculate the time and date difference in Workfront between two different objects of the same kind. For example, you cannot calculate the time and date difference between two dates on two different projects, tasks, or issues.
You can only calculate the difference between the following:
- Calculating the Time and Date Difference Between Two Date Fields on the Same Object
- Calculating the Time and Date Difference Between the Field on an Object and Another Field on the Parent Object
Calculating the Time and Date Difference Between Two Date Fields on the Same Object
For example, to calculate the difference between the Planned Completion Date and the Actual Completion Date of a task add the following column to a task report:
displayname=Planned-Actual Completion Date
linkedname=direct
querysort=plannedCompletionDate
textmode=true
valueexpression=ROUND(DATEDIFF({plannedCompletionDate},{actualCompletionDate}),2)
valueformat=HTML
The result displays in days. The time stamp on the date field is also taken into account, and the number of days might be followed by decimals if the time stamps don't match.
Calculating the Time and Date Difference Between the Field on an Object and Another Field on the Parent Object
For a list of objects and their parents, see the "Understanding the Interdependency and Hierarchy of Objects" section in "Understanding Objects."
For example, you can calculate the difference between the Planned Completion Date of a task and the Planned Completion Date of its parent task, or of the project that the task is on.
- Add the following column to a task view or report to calculate the difference between the Planned Completion Date of the task and that of the parent task:
valueexpression=ROUND(DATEDIFF({plannedCompletionDate},{parent}.{plannedCompletionDate}),2)
textmode=true
valueformat=HTML
displayname=Parent Planned Completion - Planned Completion - Add the following column to a task view or report to calculate the difference between the Planned Completion Date of the task and that of the project:
displayname=Project Planned Completion - Planned Completion
textmode=true
valueexpression=ROUND(DATEDIFF({plannedCompletionDate},{project}.{plannedCompletionDate}),2)
valueformat=HTML
You can use text mode when building filters to expand on the fields and objects you can filter by.
The most common reasons for using text mode in a filter are:
- Creating Multiple Filter Rules That Reference the Same Field
- Filtering for Items in an Approval Status
- Filtering for Items by Same-Name Statuses When the Statuses Are Associated with Different Groups
- Filtering Items by Comparing Two Fields
- Creating Complex Text-Mode Filters that Span Multiple Levels in the Object Hierarchy
- Creating Complex Text-Mode Filters for Missing Objects
Creating Multiple Filter Rules That Reference the Same Field
In the standard mode interface, when attempting to create multiple filters that reference the same field (using the AND qualifier), one of the filters is deleted when you save the report and exit the report builder.
For example, Workfront does not allow you to save the following filter rules using the standard mode interface:
Task Name > Contains > Green
Task Name > Does Not Contain > Red
However, you can create these filters using text mode:
name=green
name_Mod=cicontains
AND:1:name=red
AND:1:name_Mod=cinotcontains
Filtering for Items in an Approval Status
To display only items in a certain status which is currently in Pending Approval:
- Navigate to the filter you want to customize for a list of projects, for example.
This works the same for any other object with an approval status. - Add a Filter Rule for the Status field of the object of your list.
For example, in a project report, add Status Equal Planning, if you want to display only projects which are in a status of Planning - Pending Approval. - Click Switch to Text Mode.
- Modify the status line by adding a :A to the three letter key of the status:
status=PLN:A
status_Mod=in - Click Save Filter.
You can use the same steps to filter for all statuses of all objects that could be associated with an approval process.
Filtering for Items by Same-Name Statuses When the Statuses Are Associated with Different Groups
You can have a task status assigned to Group A named New Status with the three-letter key NST. You may have another task status assigned to Group B also named New Status with the three-letter key NES. Although the names for the two statuses can be identical, the three letter code is always unique.
For more information about group statuses, see "Creating and Customizing Group Statuses."
To distinguish between the two statuses in our example you can modify the text mode of the filter applied to a task list to ensure items in both statuses are identified:
- Navigate to the filter you want to customize for a list of tasks, for example.
This works the same for projects and issues, as well. - Add a Filter Rule for the Status field of the object of your list.
For example, in a task report, add Status Equal New Status, if you want to display only tasks which are in a status of New Status.
Notice that you have only one option for a status named New Status. - Click Switch to Text Mode.
The following code should display:
status=NST
NOTE Only one status displays here. The status line displays one of the three-letter keys for one of the statuses.
status_Mod=in - Add the following two lines of code to add the status that is missing from the filter:
status=NST
status_Mod=in
OR:1:status=NES
OR:1:status_Mod=in - Click Save Filter.
Filtering Items by Comparing Two Fields
For example, you can display only tasks where the Actual Completion Date of the task is greater than the Planned Completion Date:
- Navigate to the filter you want to customize on a task list, for example.
- Click Add Filter Rule for the Actual Completion Date field.
- Click Switch to Text Mode.
- Replace the text with the following code:
actualCompletionDate=FIELD:plannedCompletionDate
actualCompletionDate_Mod=gt - Click Save Filter.
Creating Complex Text-Mode Filters that Span Multiple Levels in the Object Hierarchy
Using EXISTS statements in the text mode interface, you can filter for objects that are removed from the filter object by more than two levels of hierarchy.
For information about filtering across multiple levels of object hierarchy, see the "Create Complex Text-Mode Filters that Span Multiple Levels in the Object Hierarchy" section in the "Create Complex Text-Mode Filters Using EXISTS Statements" article.
Creating Complex Text-Mode Filters for Missing Objects
Using EXISTS statements in the text mode interface, you can filter for objects that are missing. For example, you can display a list of users who did not log time in Workfront within a certain period of time or a list of custom fields that are not associated with any custom forms.
For information about filtering for missing objects, see the "Create Complex Text-Mode Filters for Missing Objects" section in the "Create Complex Text-Mode Filters Using EXISTS Statements" article.
You can use text mode when building groupings to expand on the fields and objects you can group by.
The most common reasons for using text mode in a grouping are:
- Grouping Results by a Calculated Value Common to All the Objects in the Grouping
- Adding a Fourth Grouping in a Standard Report
- Renaming a Grouping
Grouping Results by a Calculated Value Common to All the Objects in the Grouping
For example, you might want to view your tasks grouped by Percent Complete in ranges of 0-25, 26-50, 51-75, 75-99, and 100. Doing so would require using text mode for your grouping.
The grouping that you want to use for this example is:
textmode=true
group.0.valueexpression=IF({percentComplete}>=0&&{percentComplete}<=25,'0-25%',IF({percentComplete}>25&&{percentComplete}<=50,'26-50%',IF({percentComplete}>50&&{percentComplete}<=75,'51-75%',IF({percentComplete}>75&&{percentComplete}<=100,'76-100%',''))))
group.0.linkedname=direct
group.0.valueformat=doubleAsString
group.0.namekey=percentComplete
Adding a Fourth Grouping in a Standard Report
You can have four groupings in a matrix report. For more information about matrix reports, see "Creating a Matrix Report."
You can only have three groupings in a standard report through the standard interface. To add a fourth grouping in a standard report, you must use text mode.
For example, you have a task report which is grouped by Project Name, Progress Status and Planned Completion Date. You want to add a fourth grouping, for Assigned To Name. You can do that, with the following code inside your grouping builder:
group.0.linkedname=project
group.0.namekey=view.relatedcolumn
group.0.namekeyargkey.0=project
group.0.namekeyargkey.1=name
group.0.valuefield=project:name
group.0.valueformat=string
group.1.enumclass=com.attask.common.constants.ProgressStatusEnum
group.1.enumtype=TASK
group.1.linkedname=direct
group.1.namekey=progressStatus
group.1.type=enum
group.1.valuefield=progressStatus
group.1.valueformat=val
group.2.groupdatesby=WY
group.2.linkedname=direct
group.2.namekey=plannedCompletionDate
group.2.notime=false
group.2.valuefield=plannedCompletionDate
group.2.valueformat=atDateAsWeekString
group.3.valuefield=assignedTo:name
group.3.valueformat=HTML
textmode=true
You can rename groupings to something more familiar to your users. To do that, you can do one of the following in a grouping when you Switch to Text Mode:
- Remove all the lines in a grouping that have the word "name" in them, then add the line:
group.0.name=Your Value
You can also leave the name line blank, in which case the grouping shows the name of the value you are grouping by.
Or - Add the following line to the existing text mode code in a Grouping:
group.0.displayname=Your Value
Examples of Views, Filters and Groupings Built in Text Mode
You can use the text mode of complex views, filters and groupings which have been built by Workfront.
For more examples of already built text mode views, groupings and filters, see "Using Custom View, Filter and Grouping Samples."
***
This is linked to Understanding Text Mode (article), and https://workfront.zendesk.com/hc/en-us/articles/115000497647;
Thank you for taking the time to provide feedback. We appreciate and value your contribution to our site. Feedback provided here is regularly reviewed by our Product Documentation team. Please ensure your comments are specific to improving this help article. Any questions or requests outside this help article content should be directed to our Community User Forum or by submitting a ticket to customer support.