Conditionally display columns
  • 04 Nov 2023
  • 4 Minutes to read
  • Dark
    Light

Conditionally display columns

  • Dark
    Light

Article summary

Use the Boolean Salesforce formula field to define visibility of columns in the Edit Lines modal. This feature is helpful when you want to show some columns only to specific users.

  • When the field evaluates to True, the column is visible.
  • When the field evaluates to False, the column is hidden.

Prerequisites

Before configuring this feature, make sure that the following fields are visible and can be edited:

  • Header Field to Define Visible Condition field on Line List Column object.
  • Line Field to Define Visible Condition field on Subline Column object.
  • Line Field to Define Visible Condition on Line Parameter object.
  • Header Path Single Page Visibility on Edit Prices Dialog Field object (for a single line).
  • Header Path to Determine Visibility field on Edit Prices Dialog Field object (for multiple lines).

If the field is not visible or can't be edited, confirm that the field is added to the object's page layout and is visible in the user's profile. For detailed instructions on how to add fields and check for visibility, refer to Make fields visible or editable.

Conditionally display line list columns

Create a Boolean Salesforce formula field (or use an existing one)

  1. From the Setup interface in the customer's org, go to Object Manager.
  2. In the Fields & Relationships section, select New.
  3. In the New Custom Field dialog, in the Data Type section, select Formula (with Checkbox return type) or Checkbox, and select Next.
  4. In the Field Label and Field Name fields, specify a custom name of the field.
  5. Select Next, then select Save.

Configure conditional display of line list columns

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
  2. On the Related tab, in the Line List Columns section, select the column you want to make conditionally visible​.
  3. In the Header Field to Define Visible Condition field, specify the API name of the Boolean field you created​.
  4. Select Save.

Conditionally display tiered pricing subline columns

Note

You can conditionally display only custom tiered pricing subline columns. Predefined Value and Range columns are always visible.

Create a Boolean Salesforce formula field (or use an existing one)

  1. From the Setup interface in the customer's org, go to Object Manager and select the target object.
  2. In the Fields & Relationships section, select New.
  3. In the New Custom Field dialog, in the Data Type section, select Formula (with Checkbox return type) or Checkbox, then select Next.
  4. In the Field Label and Field Name fields, enter a custom name of the field.
  5. Select Next, then select Save.

Configure conditional display of tiered subline columns

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
  2. In the Related tab, in the Subline Columns section, select the column you want to make conditionally visible.
  3. In the Line Field to Define Visible Condition field, specify the API name of the Boolean field you created.
  4. Select Save.
Note
  • The Line Field to Define Visible Condition field overrides the Visibly By Default checkbox.
  • For the predefined Range and Value columns, the Visibly By Default checkbox should always be selected and the Line Field to Define Visible Condition field should either be empty or point to a field that evaluates to true.

Conditionally display parameter subline columns

Create a Boolean Salesforce formula field (or use an existing one)

  1. From the Setup interface in the customer's org, go to Object Manager and select the target object.
  2. In the Fields & Relationships section, select New.
  3. In the New Custom Field dialog, in the Data Type section, select Formula or Checkbox, then select Next.
  4. In the Field Label and Field Name fields, enter a custom name for the field.
  5. Select Next, then select Save.

Configure conditional display of parameter subline columns

  1. From the Lightning App Launcher, go to the appropriate Line Parameter.
  2. In the Details tab, in the Line Field to Define Visible Condition field, specify the API name of the Boolean field you created.
  3. Select Save.
Note
  • To hide the column by default, clear the Visibly by Default checkbox.
  • The Line Field to Define Visible Condition field overrides the Visibly By Default checkbox.
  • If the Line Field to Define Visible Condition field evaluates to true, the column will be visible.

Conditionally display Edit Lines columns

Create a Boolean Salesforce formula field (or use an existing one)

  1. From the Setup interface in the customer's org, go to Object Manager and select the target object.
  2. In the Fields & Relationships section, select New.
  3. In the New Custom Field dialog, in the Data Type section, select Formula (with Checkbox return type) or Checkbox, then select Next.
  4. In the Field Label and Field Name fields, enter a custom name of the field.
  5. Select Next, then select Save.

Configure conditional display of Edit Lines columns

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.

  2. On the Related tab, in the Edit Line Dialog Fields section, select the column you want to make conditionally visible in the Edit Lines modal.

  3. In the Layout section, specify a numeric value for the Table Field Order in the Edit Lines modal.

    Important

    If you leave the Table Field Order field empty, the column will be always hidden.

  4. In the Header Path to Determine Visibility field, specify the API name of the Boolean field you created.

  5. Select Save.

    Note

    If you leave the Header Path to Determine Visibility field empty, the column's visibility depends only on the Table Field Order field. If it is empty, the column is always hidden. If you specify the order, the column is always visible.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.