Introduction

Getting started

Walkthrough Guides

CafeX Apps

Workflows

Using CafeX Collaborate App

Reporting

Managing CafeX

Integrating CafeX

Security

App Studio

App Studio Components

How-tos

App Studio

Conditional Overrides

Modified on Wed, 26 Mar at 9:20 AM

TABLE OF CONTENTS

The Conditional overrides page allows you to adjust an App’s display and behavior based on specific runtime conditions. This feature removes the need to create multiple App versions for small differences, making it easier to manage and update.


Conditional overrides consist of two parts: a condition and a set of changes (overrides). You can manage them in the Conditional Overrides dialog, which can be accessed through the Conditional Overrides menu item () found in the left-hand bar of the App Studio.

 

Supported Conditions

You can currently set overrides based on two types of conditions:

  1. URL Parameter: The override is applied if a specific URL parameter and value are found in the App’s URL.
  2. Workspace Label: The override is applied if a matching workspace label and value are detected.

Important: All conditional overrides in an App must use the same condition type. Once you create the first override, all subsequent overrides will automatically follow the same type, which cannot be changed.

 

Creating and Managing Conditional Overrides

To configure a conditional override, you must first define a condition and then activate it in the App Studio.

Creating a Condition

For this article, we’ll use an example of an ordering App for cheesecakes and we’ll have a separate version for cookies. Instead of creating and maintaining separate Apps, Conditional Overrides allow us to adjust text, images, and data set configurations.

 

To create a condition:

  1. Navigate to the Conditional overrides page ( ).
  2. Click the plus icon to create a new condition.
  3. Specify the Name for the Condition.
  4. Select the Condition: URL parameter or Workspace label.
  5. Depending on the condition, specify the URL parameter or Workspace label and Value.
  6. At this point, the Overrides section will display the message: No overrides have been defined for this condition.

 

Activating a Conditional Override in the App Studio

After the Conditional override has been created, it must be applied in the App’s Configuration to make relevant modifications to components:

  1. Go to Explorer > App.
  2. In the Selected conditional overrides dropdown, select the Conditional override.

    When a conditional override is selected, an orange heading banner appears, and the App becomes partially locked for editing.
     


When a conditional override is active, a simplified configuration panel is displayed, highlighting the settings that can be overridden. These include:

  • Text: Update text in text and rich text components.
  • Tooltip text: Change tooltips for components that have tooltip text.
  • Image URL: Override URL fields for image components.
  • Tab visibility: Change the visibility condition value tabs in a tab component.
  • Hide page: Use the Hide page toggle to hide specific pages.
  • Field visibility: Adjust field visibility in forms and tables.
  • Field read-Only: Change whether fields in forms and tables can be edited.
  • Field display name: Rename form and table field names.
  • Table column width: Resize columns by dragging headers.
  • Form validations: Modify form validation rules.
  • Multiple choice options: Change available options for multiple-choice fields.
  • Data sets: Update data set settings (see the Data Set Overrides section below for details).

Exiting the Override View

To exit the override view and restore the base App configuration, return to the configuration panel and select the blank/empty option in the Selected conditional overrides dropdown.

Viewing and Deleting Overrides

All created overrides are listed in the Conditional Overrides dialog, grouped by type. There is also an Unapplied category, where overrides that no longer have an effect are highlighted in orange. This can happen, for example, if the component they were applied to has been deleted.


To remove an override:

  1. Open the Conditional Overrides dialog,
  2. Hover over an entry in the list and click a trash icon to delete it.

Data Set Overrides

Data set overrides allow you to use different data sources and define custom mappings between the data set and its data source. This is useful when different conditions require pulling data from an alternative source while maintaining the same data set structure.

 

How Data Set Overrides Work

In a base App configuration, a data set is typically linked to a specific data source. For example, a data set might retrieve a user label based on a user ID by calling a getusernamebyid data source. However, under a different condition, we might need to call a getfirstnamebyid data source, which retrieves a first name.

 

By applying a conditional override, we can:

  • Change the data source while keeping the same data set inputs.
  • Modify output field mappings to match the new data source’s response.

Configuring Data Set Overrides

To override a data set:

  1. Ensure the base data set (App > Configuration > Data sets) has the following options enabled:
    - Remap input parameters
    - Remap output schema
  2. Go to App > Appearance and Configuration panel and select the override from the Selected conditional overrides dropdown.
  3. Click on the data set to open the data set configuration dialog. Note that some settings in the override view remain locked (grayed out).
  4. Update the Source to a different data source.
  5. Adjust the Data set outputs to match the format of the new data source’s response:
  • Hover over the attribute in the list and click the Edit attribute icon that appears on the right.
     
  • Click the Update attribute tick icon to apply the changes.

Note: If you want to quickly view an attribute's mapping, hover over it to reveal the green circle, then place your cursor over the circle to see the mapping details.

 

Example Scenario

Suppose the base data set retrieves a user label using getusernamebyid source, where:

  • The input field is id, mapped from userId in the App.
  • The API response contains id and username, but the data set maps:
    • id → id
    • username → userLabel

Now, we apply a conditional override to switch the data source to getfirstnamebyid, where the API response contains id and firstName. Since some data set properties remain fixed, only the data set outputs can be modified. In this case, we update the mappings to:

  • id → id (remains the same)
  • firstName → userLabel (overriding the previous mapping)


When a data set override is applied, the data source behind the data set changes, which affects the returned data while keeping the input structure the same. 

In the base App, entering a user ID retrieves the username from the getusernamebyid data source:


However, when the override is applied, the App switches to the getfirstnamebyid data source, returning the first name instead:


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article