Conditional formatting in Text Mode

Text mode enables you to create more complex views, filters, groupings, and prompts by allowing you to use fields that are not available in the standard interface.

For a complete list of all our reportable fields, see the API Explorer.

For more information about using text mode syntax, see Text mode syntax overview.

You can also use text mode to format views in reports and lists. Using conditional formatting, you can change the views of your reports by changing the font type and background of the results in the report, as well as icons and flags. We recommend that you always build your views using the standard interface first and switch to the text mode interface only when absolutely necessary.

NOTE
Using CSS styling to customize conditional formatting is not supported. Instead, you must use the predesigned formatting options that are available in Adobe Workfront.

Add conditional formatting to Views

For more information about applying conditional formatting to a view in the standard builder interface, see Use conditional formatting in views.

To add conditional formatting to a view in the text mode interface:

  1. Go to a list of objects.
  2. Expand the drop-down menu of a view to which you want to add conditional formatting.
  3. Click Customize View.
  4. Click the column in the view to which you want to apply conditional formatting.
  5. Click Switch to Text Mode.
  6. In the Show in this column: area, click Click to edit text.
  7. Add the code samples provided in Format Views using Text Mode at the bottom of the text in the column you selected.
  8. Click Save, then click Save View.

Format Views using Text Mode

You can add the following components to a column in a view to conditionally format it in text mode:

Column settings

You must be familiar with the text mode interface before you can add conditional formatting to your views.

You can customize the following elements of a column when using conditional formatting in a view:

Column headers

To change the displayed column header, add the following code to your column: displayname= [Name of column]. For example, to name a column Project Owner, the text code would look like:

displayname=Project Owner

Format dates

Dates can be configured to display in various formats.

For more information, see Format dates in text mode reports.

Format numbers

You can format numeric values to display information that best suits your reporting needs.

For more information, see Format numbers, currency and percentage values in text mode reports.

Column rules

Column rules allow for the addition of images, color, formatting, and text overrides within a view. Column rules can be established independently or can contain multiple conditions for a column.

Conditional formatting

A specific text mode statement must be applied when incorporating color or formatting text.

NOTE
Conditional formatting may not be supported in merged columns.
For more information on merging columns with Text Mode, see View: merge information from multiple columns in one shared column.

Insert the following code in any column where you want to add conditional formatting to:

styledef.case.0.comparison.leftmethod= [field name]
styledef.case.0.comparison.lefttext= [field name]
styledef.case.0.comparison.righttext= [field value]
styledef.case.0.comparison.operator= [qualifier]
styledef.case.0.comparison.operatortype= [data type]
styledef.case.0.comparison.icon=false
styledef.case.0.comparison.truetext=
styledef.case.0.comparison.trueproperty.0.name= [format option]
styledef.case.0.comparison.trueproperty.0.value= [format style]
NOTE
The styledef.case.0.comparison.icon line is always false unless working with icons.
The styledef.case.0.comparison.truetext line is always left blank until working with overwriting text.
The styledef.case.0.comparison.righttext line is blank when the qualifier is notblank.

For example, if we wanted to show the Company Name in green text on a project report, you can use the following code:

styledef.case.0.comparison.leftmethod=company:name
styledef.case.0.comparison.lefttext=company:name ;
styledef.case.0.comparison.righttext=
styledef.case.0.comparison.operator=notblank
styledef.case.0.comparison.operatortype=string
styledef.case.0.comparison.icon=false
styledef.case.0.comparison.truetext=
styledef.case.0.comparison.trueproperty.0.name=textcolor
styledef.case.0.comparison.trueproperty.0.value=03a219
NOTE
  • While this statement could be applied to a Company Name column, it could also be applied to any other column on the report. Green text would only be displayed if the project had a Company associated with it. Remember the [field name], [value], and [qualifier] drive whether or not the conditioning ultimately displays on the column.
  • When working with qualifiers, we recommended using cicontains rather than equal. By default, equal looks for ID numbers. Using the cicontains qualifier, you can access items by their name.

Text mode example

Text mode example results

Whether Text Color, Alignment, Font Style, or Background Color are applied to a text mode, the same statement (shown above) is used.

The following lines must be modified to reflect the corresponding formatting needed for the column:

styledef.case.0.comparison.trueproperty.0.name= [format option]
styledef.case.0.comparison.trueproperty.0.value= [format style]

Use the following tables to identify which lines must be modified and what values you should specify to define the format style of your column:

Text ColorLine: textcolor=
Black000000
Dark Blue0c6aca
Teal1b878c
Green03a219
Purple6408c4
Grey767676
Redd30519
Yellowe19503
AlignmentLine: align=
Left alignmentleft
Right alignmentright
Center Alignmentcenter
FontLine: fontstyle=
Boldbold
Italicitalic
Background ColorLine: bgcolor=
Tealdcf6f7
Greendef6e2
Greye8e8e8
Bluee8f1ff
Purplee9def4
Redeac6c9
Yellowfeecc8
Whiteffffff

Multiple conditional formats

You can apply more than one formatting style to a statement. The core statement would remain unchanged and any additional formatting expressions would be added to the statement.

For example, using the earlier statement to include Company Name in green bolded text. The statement would be written using the following code:

styledef.case.0.comparison.leftmethod=company:name
styledef.case.0.comparison.lefttext=company:name
styledef.case.0.comparison.righttext=
styledef.case.0.comparison.operator=notblank
styledef.case.0.comparison.operatortype=string
styledef.case.0.comparison.icon=false
styledef.case.0.comparison.truetext=
styledef.case.0.comparison.trueproperty.0.name=textcolor
styledef.case.0.comparison.trueproperty.0.value=03a219
styledef.case.0.comparison.trueproperty.1.name=fontstyle
styledef.case.0.comparison.trueproperty.1.value=bold
NOTE
When including more than one conditional formatting expression, it is necessary to numerically identify each expression in the statement. Notice that expression 0 and expression 1 have been identified.

Apply text

If you want to replace the default values that populate in a column with a value of your choosing, it is possible when applying text to the column.

For example, on a project report, set the Planned Start Date column value to not display the planned start date for the project, but rather the text ‘Not Today.’ Use the following code for the Planned Start Date column:

case.0.comparison.leftmethod=plannedStartDate
case.0.comparison.lefttext=plannedStartDate
case.0.comparison.righttext=2013-04-10T10:45:00:000
case.0.comparison.operator=ne
case.0.comparison.operatortype=date
case.0.comparison.icon=false
case.0.comparison.truetext=not today
styledef.case.0.comparison.leftmethod=plannedStartDate
styledef.case.0.comparison.lefttext=plannedStartDate
styledef.case.0.comparison.righttext=2013-04-10T10:45:00:000
styledef.case.0.comparison.operator=ne
styledef.case.0.comparison.operatortype=date&
styledef.case.0.comparison.icon=false
styledef.case.0.comparison.truetext=not today
NOTE
The lines that start with case.0. use case comparisons to identifying the use of text. The lines that start with styledef.case.0. are early conditional formatting statements where we identify the use of text through the truetext expression. Make sure to set truetext to a value, rather than leaving it blank.

Apply text example

Apply text results

Apply row formats

If you would like to apply a condition to the entire row, use the following code with your column code:

styledef.case.0.comparison.icon=false
styledef.case.0.comparison.isrowcase=true
styledef.case.0.comparison.leftmethod= [field name]
styledef.case.0.comparison.lefttext= [field name]
styledef.case.0.comparison.operator= [qualifier]
styledef.case.0.comparison.operatortype= [data type]
styledef.case.0.comparison.righttext= [field value]
styledef.case.0.comparison.trueproperty.0.name= [format option]
styledef.case.0.comparison.trueproperty.0.value= [format style]
styledef.case.0.comparison.truetext=
row.0.styledef.applyallcases=true
row.0.styledef.case.0.comparison.icon=false
row.0.styledef.case.0.comparison.isrowcase=true
row.0.styledef.case.0.comparison.leftmethod= [field name]
row.0.styledef.case.0.comparison.lefttext= [field name]
row.0.styledef.case.0.comparison.operator= [qualifier]
row.0.styledef.case.0.comparison.operatortype= [data type]
row.0.styledef.case.0.comparison.righttext= [field value]
row.0.styledef.case.0.comparison.trueproperty.0.name= [format option]
row.0.styledef.case.0.comparison.trueproperty.0.value= [format style]
row.0.styledef.case.0.comparison.truetext=

Apply images

Similarly to formatting with text, images can be used to display information in reports. Workfront has a number of built-in images to convey visual information in a report setting. To use images in the conditional formatting setting the following statement is needed:

image.case.0.comparison.leftmethod= [field name]
image.case.0.comparison.lefttext= [field name]
image.case.0.comparison.righttext= [field value]
image.case.0.comparison.operator= [qualifier]
image.case.0.comparison.operatortype= [data type]
image.case.0.comparison.icon=true
image.case.0.comparison.truetext=

For example, on a project report, you want to build a column where you would show a frown face for every Planned Completion Date that does not equal to today’s date. Use the following text mode code to add the icon to your column:

image.case.0.comparison.leftmethod=plannedCompletionDate
image.case.0.comparison.lefttext=plannedCompletionDate
image.case.0.comparison.righttext=2013-04-10T13:00:00:000
image.case.0.comparison.operator=ne
image.case.0.comparison.operatortype=date
image.case.0.comparison.icon=true
image.case.0.comparison.truetext=/interface/images/v4_redux/icons/casebuilder/emoticon_frown.gif
NOTE
Notice that the statement uses the icon=true expression. This statement is also different from other conditional formatting statements in that it does not use the style.def format, but rather a unique image format.

Icon text mode

Icon text mode results

To use the images available, apply the following code and values:

IconLine: image.case.0.comparison.truetext=
Frown Face Frown face =/interface/images/v4_redux/icons/casebuilder/emoticon_frown.gif
Happy Face Happy face =/interface/images/v4_redux/icons/casebuilder/emoticon_smile.gif
Blue Flag Blue flag =/interface/images/v4_redux/icons/casebuilder/flag_blue.gif
Green Flag Green flag =/interface/images/v4_redux/icons/casebuilder/flag_green.gif
Red Flag Red flag =/interface/images/v4_redux/icons/casebuilder/flag_red.gif
Yellow Flag Yellow flag =/interface/images/v4_redux/icons/casebuilder/flag_yellow.gif
Black Circle Black circle =/interface/images/v4_redux/icons/casebuilder/light_black.gif
Blue Circle Blue circle =/interface/images/v4_redux/icons/casebuilder/light_blue.gif
Grey Circle Grey circle =/interface/images/v4_redux/icons/casebuilder/light_grey.gif
Green Circle Green circle =/interface/images/v4_redux/icons/casebuilder/light_green.gif
Orange Circle Orange circle =/interface/images/v4_redux/icons/casebuilder/light_orange.gif
Pink Circle Pink circle =/interface/images/v4_redux/icons/casebuilder/light_pink.gif
Purple Circle Purple circle =/interface/images/v4_redux/icons/casebuilder/light_purple.gif
Red Circle Red circle =/interface/images/v4_redux/icons/casebuilder/light_red.gif
White Circle White circle =/interface/images/v4_redux/icons/casebuilder/light_white.gif
Yellow Circle Yellow circle =/interface/images/v4_redux/icons/casebuilder/light_yellow.gif

Conditionally format a valueexpression

To display a calculated value in a column, you can replace the valuefield line of code in the column with a valueexpression. A calculated value allows you to display a new value for an object based on the calculation between two existing fields on that same object.

For more information about how to format the valueexpression line, see Text mode syntax overview.

You cannot conditionally format a column which contains a valueexpression line of code. Instead, you can add a Calculated Custom Field to a Custom Form and associate it with the objects you are displaying in the report. Then, you can conditionally format the columns displaying this field.

For more information about Calculated Custom Fields, see Add calculated fields to a form.

Add an aggregator value in a Text Mode column

We recommend that you build the column in the builder interface first, add the aggregator value there, and then edit the column in Text Mode.

Consider the following when adding aggregators to a column in Text Mode:

  • The values in the column must have a format that can be summarized. For example, they must have one of the following formats:

    • Number
    • Date
    • Currency
  • You can add an aggregator to a column that displays a calculation. The aggregated value displays in the grouping of the view or report. For more information, see Grouping: display the result of aggregating multiple calculated values in a grouping.

  • The lines of code for the definition of the column must be identical to the lines of code introducing the aggregator and preceded by “aggregator.” For example, if you have a column where you display Planned Hours on a project, the text mode of the main lines of the column is:

  valuefield=workRequired
  valueformat=compound

When you want to aggregate the values of all the lines in the grouping of the view, we can add the following code to add the aggregator values:

aggregator.valuefield=workRequired (the aggregator.valuefield line must be the same as the valuefield that describes the column)

aggregator.valueformat=compound (the aggregator.valueformat line must have the same value as the valueformat that describes the column)

aggregator.function=SUM (this is a mandatory line that indicates how you want to aggregate the column, in this case, you want to add all the individual Planned Hours into one number in the grouping line)

aggregator.displayformat=minutesAsHoursString (because hours are stored in Workfront in minutes, we want to indicate the displayformat for hours when they are stored in minutes)

Previous pageEdit a grouping using text mode
Next pageFormat dates in text mode reports

Workfront


Learn: Automating Workflows with Workfront Fusion - Unique Use Cases in Action

Workfront

Tuesday, Mar 4, 6:00 PM UTC

Looking for creative ways to use Workfront Fusion to solve business challenges? Join Pan Shahbazian of Starbucks as she shares three unique use cases that can transform your workflows.

Register

The Perfect Blend: A New Era of Collaboration with AEM and Workfront

Adobe Customer Success Webinars

Wednesday, Apr 2, 5:00 PM UTC

Explore how Adobe Experience Manager and Workfront integrate to help teams move from ideation to delivery without the usual bottlenecks, ensuring content is organized, on-brand, and ready to go live faster.

Register

B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth

Online | Strategy Keynote | General Audience

B2B brands are facing a digital revolution. Buyers expect hyper-relevant content and self-service, while internally AI is transforming...

Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)

Register

The Future of Adobe Workfront

Online | Session | General Audience

Join Adobe Workfront product leaders to get a sneak peek of the future of strategic planning and workflow in what is the most attended...

Tue, Mar 18, 3:30 PM PDT (10:30 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more

Register to learn something new

WORKFRONT

Join Adobe product experts in live events where you will learn Adobe Workfront best practices, tips and tricks, and hear about the latest product features and updates.

Register