- Types of Overrides
- Examples Use Cases
Types of Overrides
Within the Capriza Designer, it is possible to override virtually any type of control. While the exact options will depend upon the control type, they can be broadly categorized into two types:
- Web Properties: Changes attributes of the control itself, such as changing the items in a popup menu, changing label text, etc.
- Actions: Modifies the control's behavior when acted upon by the user. Examples include clicking a button, opening a lookup field, etc.
Example Use Cases
An override can be used to change the options displayed in a popup menu. In this example, three options from the web application are included in the popup menu: Back to Portal, Employee Directory, and My Profile.
To create the override, click the wrench icon to open the Web Properties dialog.
Navigate to the "Properties" tab. To ensure that the override affects all potential options in the popup menu, check that "All Options" is selected under "Which menu options should be available in the Zapp?"
Scroll down to view the available override settings. They are contained in two section: Web Properties and Override Actions.
To change the options included in the popup menu, select toggle on the "Open popup-menu" override.
A text input field will appear. Enter your script.
Exit the dialog. The updated options will now display when the popup menu is opened.
Use Another Field for Label Text
Overrides can also be used to replace a text field's label with text from another field on the page. To enable this type of override, open the "Properties" tab and scroll to the Web Properties section. Toggle on the "Use dynamic display label" setting.
Select "Override" from the dropdown.
Changing Text Color Based on Value
The following three videos demonstrate how to change text color based on an element's value. Part 1 begins with a simple example using Salesforce.
In this first example, a Leads report in Salesforce includes a field called "Lead Status" that indicates the lead's quality. An override can be used to add color indicators to this field in the mobile table, enhancing the user experience.
First, open the Web Properties dialog for the "Lead Status" field by hovering over the mobile preview and clicking the wrench icon.
Navigate to the "Properties" tab and scroll to "Text Retrieval Method."
Open the dropdown, and choose "Override."
Enter the below code into the box.
The "Lead Status" field in each table row will now appear in the appropriate color.
Part 2 of the video series provides a second example, this time in SAP.
In this second example, a Stock Requirements Zapp indicates the remaining stock of each type of material. You can use an override to highlight the color of the "Plant Stock" field in a different color depending on its value.
First, hover over the "Plant Stock" field, and click the wrench icon to launch the Web Properties dialog.
Change the "Text Retrieval Method" to Override, and enter the below code into the box.
The background color of Plant Stock will now vary based on its value.
Part 3 provides a more advanced example that leverages existing functionality on the web application page.
In this final example, rather than rely on the value of a string or an element's textContent, you can leverage the color displayed in the "Light" column within the SAP table to vary the color and text of Plant Stock.
Again, open the Web Properties dialog, and change the "Text Retrieval Method" to Override. Enter the below code in the textbox.
The appropriately styled text will now appear in place of the Plant Stock value in each table row.