Forms and Fields: Conditional Fields

Objective

After completing this lesson, you will be able to create a Conditional Field setup

Forms and Fields: Conditional Fields

The Conditional Fields feature allows administrators to dynamically show or hide fields based on user input. When a user selects or enters a specific value in one field (the source field), another field (the target field) automatically appears or remains hidden according to defined rules.

To access this feature, select the Conditional Fields tab on the Forms and Fields page.​

Image of an SAP Forms and Fields configuration screen with the Conditional Fields tab selected for Expense Report Header, showing New, Modify, Remove buttons and an empty table of field conditions.

Prerequisites

Before configuring conditional fields, ensure that all source and target fields:

  • Are included on the appropriate form
  • Have the desired visibility settings
  • Have the correct data type
  • Contain any required associated list data

Note

Only custom fields can be used in conditional field configurations. Connected lists are not supported for conditional fields.

Configure a Conditional Field

Review the steps below to learn how to configure a conditional field.

Steps

  1. On the Conditional Fields tab, select New.

    Image of a Forms and Fields configuration page with Form Type set to Expense Report Header, the Conditional Fields tab open, and New, Modify, Remove buttons above an empty grid.
  2. On the Conditional Fields window, complete the appropriate fields.

    Image of the Conditional Fields on the Forms and Fields page; Field Name, Applies To, Where Condition, Value, Action, Target Field name, with Save and Cancel buttons below.

    Review the following table to learn more about the field options.​

    FieldDescription
    Field Name​

    Select the source field.​

    Note: Fields will not appear in this list unless they are present on a form definition for the relevant form type. Ensure that all desired fields are present on the form before configuring the condition.​

    Applies To​

    Select the desired form.​

    Note: ​The source and target fields must be present on the form.​

    Where Condition​Select the desired option (differ by field type).​
    Item Code/Item Name​Select the list item data to search when evaluating the condition. Appears for all conditions except Equals.​
    Value​

    This field changes depending on the data type of the source field, for example:​

    • For text fields, enter the desired text.​

    • For lists, enter the value to search for. Depending on the Item. Code/Item Name radio button value, the search will check the code or name for this value.​

    • For check boxes, select the check box (indicating True).​

    Action​

    Select one of these:​

    • Show​

    • Hide​

    Target Field Name​Select the desired target field.​
  3. When you are done, select Save.

    Image of the Conditional Fields on the Forms and Fields page; Field Name, Applies To, Where Condition, Value, Action, Target Field name, with Save and Cancel buttons below. Save is selected.

Result

The newly saved conditional field displays on the Conditional Fields tab.

The conditional field displays on the Conditional Field tab.

Summary

  • Use Conditional Fields to show or hide fields based on user input.​
  • Access the Conditional Fields tab on the Forms and Fields page.​
  • Ensure source and target fields exist and have correct visibility, type, and list data.​
  • Only custom fields are supported; connected lists are not allowed.​
  • Select New, complete rule details in the Conditional Fields window, and Save.​

Reference

TopicLink
Configuration – Conditional FieldsSAP Help Portal