Skip to main content

Show If

Last updated 23/04/2024

Show If Field

The Show If field is used to show or hide an element.

Default:
true


Available
  • Form Fields
  • Data Fields
  • Action Buttons
  • Application Buttons
  • Menus

The Show If field enables you to show or hide buttons, fields, and menus. If the expression evaluates to

true
, the element will be shown; if
false
, the element will be hidden.

The Show If field is used to:

  • Show and hide form fields and data fields, these can be shown dependent of values in other fields.
  • Show and hide action/application buttons in only select circumstances.
  • Show and hide menus.

Hide a Form Field

You may want to hide a form field to keep your data integrity. For example, if a user fills in their first name and last name, you may have a calculated field that adds their full name and this field never needs to show.

1. Navigate to the Forms view by selecting Visual in the menu and Forms in the sub-menu.

2. Select the required record in the list.

3. Click the Pages tab.


Pages tab
Figure 1 - Pages tab

4. Select the page record holding your fields.


Page record
Figure 2 - Page record

5. Click the Fields tab.


Fields tab
Figure 3 - Fields tab

6. Select the required field record.


Field record
Figure 4 - Field record

7. Click the Display tab.


Display tab
Figure 5 - Display tab

8. Click in the Show If field and type
false
.


tip
You can add an equation to the field!

Show If field
Figure 6 - Show If field

9. Click the Save button in the form app bar.


Save button
Figure 7 - Save button

10. Click the Save button in the form app bar above the list.


Save button
Figure 8 - Save button

Example

info
The Full Name field will not be shown on the form.

Full Name field is hidden
Figure 9 - Full Name field is hidden

Show a Field Dependent on Another Field's Value

Quite often you may only want to show a field dependent on the value in another field, this can reduce the number of fields shown on your form on initial creation and only displays the fields relevant for the user. This is where adding an equation can be useful. For example, let's say a student can click that they are enrolled, then the Student No field appears for them to add their student number. In the Show If field, you would need to add:

=(five.field.Enrolled === true)
bearing in mind Enrolled is the field ID for the dependent field.

1. Type your equation in the Show If field.


Equation in the Show If field
Figure 10 - Equation in the Show If field

Example

info
When the Enrolled switch is in a
true
state, the Student No field will show.

Show field
Figure 11 - Show field

Data View Show If Field

To conditionally show or hide a data field , click the Data Fields tab in the data views view and select the data field record. This field will not show on the data view.


Data field Show If field
Figure 12 - Data field Show If field

Application and Action Buttons Show If Field

To conditionally show or hide an application or action button, click the Application/Action buttons tab in the respective view and select the button record. This action button will only show if the Quantity field is greater than 0.


Action button Show If field
Figure 13 - Action button Show If field

To conditionally show or hide a menu, add a condition to the Show If field. This menu will only show if the application is running in the cloud.


Menu Show If field
Figure 14 - Menu Show If field