---
schema_version: "1"
id: 8b428d764574d6f0267e633f466082f156801f7b3c77e7947024fa187a7f3cec
title: UiFormatSpecificationSet
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_uiformatspecificationset.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_uiformatspecificationset.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2ae16db515284e16242b8ab76d3f8cdb0596a6e2057b4321b5a34b1cc6fec628
description: Represents a set of rules that define the style and visibility of conditional field formatting on Dynamic Forms-enabled Lightning page field instances.
---
# UiFormatSpecificationSet

Represents a set of rules that define the style and visibility of conditional field formatting on Dynamic Forms-enabled Lightning page field instances.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png)

#### Note

A UiFormatSpecificationSet is referred to as a conditional formatting ruleset in the rest of the Salesforce documentation and UI.

## File Suffix and Directory Location

UiFormatSpecificationSet components have the suffix .uiFormatSpecificationSet and are stored in the uiFormatSpecificationSets folder.

## Version

UiFormatSpecificationSet components are available in API version 62.0 and later.

## Special Access Rules

There are no additional access requirements that are specific to this type.

## Fields

| Field Name | Description |
| --- | --- |
| field | 
Field Type

string

Description

Required. The object field that the conditional formatting is associated with.





 |
| formatType | 

Field Type

FormatType (enumeration of type string)

Description

Required. The type of conditional formatting associated with the field.

Values are:

- ICON





 |
| masterLabel | 

Field Type

string

Description

Required. The label for the conditional formatting ruleset, which displays in Setup.





 |
| sobjectType | 

Field Type

string

Description

Required. The object the ruleset is associated with.





 |
| uiFormatSpecifications | 

Field Type

[UiFormatSpecification\[\]](#UiFormatSpecification)

Description

The list of rules contained in the ruleset.



 |

## UiFormatSpecification

A single rule in the ruleset.

| Field Name | Description |
| --- | --- |
| formatProperties | 
Field Type

string

Description

Required. The properties for a given formatType in JSON format.





 |
| formatType | 

Field Type

FormatType (enumeration of type string)

Description

Required. The type of conditional formatting associated with the field when the rule evaluates to true.

Values are:

- ICON





 |
| order | 

Field Type

int

Description

Required. A numerical value representing the conditional formatting rule’s position in the evaluation order.





 |
| visibilityRule | 

Field Type

[UiFormulaRule](#UiFormulaRule)

Description

A set of one or more filters that define the conditions under which the conditional formatting appears on the field.

If the visibility rule evaluates to true, the formatting displays on the field. If false, it doesn’t display. If this field is null, the formatting displays by default.





 |

## UiFormulaRule

A set of one or more filters that define the conditions under which conditional field formatting displays on a Dynamic Forms-enabled Lightning page field instance. For example, you could construct a filter that causes conditional formatting to display only when the Amount field is greater than $1,000,000.

| Field Name | Description |
| --- | --- |
| booleanFilter | 
Field Type

string

Description

Specifies advanced filter conditions such as 1 AND 2.



 |
| criteria | 

Field Type

[UiFormulaCriterion\[\]](#UiFormulaCriterion)

Description

List of one or more filters that, when evaluated, determine conditional field formatting visibility.



 |

## UiFormulaCriterion

A single filter that when evaluated, helps define conditional formatting visibility on a Dynamic Forms-enabled Lightning page field instance.

| Field Name | Description |
| --- | --- |
| leftValue | 
Field Type

string

Description

Required. The field upon which the filter is based. For example, AMOUNT.



 |
| operator | 

Field Type

string

Description

Required. Defines the operator used to filter the data. Valid values are:

- CONTAINS
- EQUAL
- NE—not equal
- GT—greater than
- GE—greater than or equal
- LE—less than or equal
- LT—less than





 |
| rightValue | 

Field Type

string

Description

The value by which you want to evaluate the formatting visibility. For example, 1000000.



 |

## Declarative Metadata Sample Definition

The following is an example of an UiFormatSpecificationSet component.

<?xml version="1.0" encoding="UTF-8"?>
<UiFormatSpecificationSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <field\>Contact.Customer\_Sentiment\_\_c</field\>
    <formatType\>ICON</formatType\>
    <masterLabel\>Sentiment Score</masterLabel\>
    <sobjectType\>Contact</sobjectType\>
    <uiFormatSpecifications\>
        <formatProperties\>{&quot;icon&quot;:&quot;happy\_face&quot;,
&quot;iconColor&quot;:&quot;green&quot;}</formatProperties\>
        <formatType\>ICON</formatType\>
        <order\>1</order\>
        <visibilityRule\>
            <criteria\>
                <leftValue\>{!Record.Customer\_Sentiment\_\_c}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>Happy</rightValue\>
            </criteria\>
        </visibilityRule\>
    </uiFormatSpecifications\>
    <uiFormatSpecifications\>
        <formatProperties\>{&quot;icon&quot;:&quot;neutral\_face&quot;,
&quot;iconColor&quot;:&quot;gray&quot;}</formatProperties\>
        <formatType\>ICON</formatType\>
        <order\>2</order\>
        <visibilityRule\>
            <criteria\>
                <leftValue\>{!Record.Customer\_Sentiment\_\_c}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>Neutral</rightValue\>
            </criteria\>
        </visibilityRule\>
    </uiFormatSpecifications\>
    <uiFormatSpecifications\>
        <formatProperties\>{&quot;icon&quot;:&quot;sad\_face&quot;,
&quot;iconColor&quot;:&quot;red&quot;}</formatProperties\>
        <formatType\>ICON</formatType\>
        <order\>3</order\>
        <visibilityRule\>
            <criteria\>
                <leftValue\>{!Record.Customer\_Sentiment\_\_c}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>Unhappy</rightValue\>
            </criteria\>
        </visibilityRule\>
    </uiFormatSpecifications\>
</UiFormatSpecificationSet\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>Sentiment\_Score</members\>
        <name\>UiFormatSpecificationSet</name\>
    </types\>
    <version\>62.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").