In this article, you can learn about source settings in views and how those settings apply to which records will display.
All views will note which records are being shown in the view editor. However, in views that display multiple records, you have the option to customize which records are displayed.
In the “Source” tab within the view's settings, you have the option to add internal filters that customize which records are shown and how they are displayed. By default, views will display every record stored from that table if no filters are applied.
Source Settings
The Source tab has three sections that allow you to customize which records are displayed:
-
Data: Add rules to define and limit which records will be displayed.
-
Sort: Define the sort order in which records will be displayed.
-
Limit: Define how many records to show. If you want to display only a certain number of records instead of all of them, you can set a limit.
For example, we may want to display our top ten Products, so we would set the limit to "10".
Data
The Data section of the Source settings indicates which table's records the grid is displaying. Here, you can add rules that add internal filters that filter the records from that table.
These rules allow you to match specific field values to filter the records and apply these filters in groups.
For example, in a Customer Portal app for Service Requests, you may want to create a view that only shows Service Request records that are open. You can do this by adding a rule to restrict the Service Request records to those where Status = Open.
Adding Rules
To add your first rule to a view, select the "Filter Records" button:
Rules add an internal filter to restrict which of the table's records will display in your view. This means records will only display when they match your rules, and these filters cannot be removed by users in the Live App.
There are three parts to a rule:
-
Field: The field input displays the fields in the view’s table.
-
Operator: The operator is how you will filter your records and is dependent on the field type. For example, date/time fields have options that other fields do not have, such as “is before today”.
-
Value: The values are the conditions you are matching for and are dependent on the type of field. For example, a date/time field with an operator of “is before” and a value of “05/05/2024”. Not all rules will need values inputted.
For example, in the Customer Portal sample app, you may also want to view only display Service Records with a Status of complete to see a past history of requests. We can add a rule to the view’s source to restrict the records to those where "Status is Complete".
Matching Records
When adding multiple rules, you can specify if records must match "any" or "all" rules. This applies only when there are multiple rules.
Match All
When using the "all" option, all rules must be met to return records. For example, you may want to create a view that displays all open Service Requests where the services needed are "Troubleshooting and Repair".
In this case, you’d need to create two rules and require an "all" match:
-
One rule to match all Service Requests with a status of “Open”
-
A second rule to match Service Requests with Services Needed that equals "Troubleshooting and Repair"
Match Any
When using the "any" option, records matching any of the rules will be returned records. For example, you may want to create a view displaying any Service Requests that meet either of two criteria.
You can create two rules and require an "any" match to view all Service Requests with either a Service Needed set as "Troubleshooting and Repair" or Service Needed as "Software Installation":
-
A second rule to match Service Requests with services needed that equals "Troubleshooting and Repair
-
One rule to match a Service Request with a service needed that equals "Software Installation"
Adding Groups
Groups allow you to group multiple rules together with different matching. For example, perhaps you must match your first rule, and only either of your last two rules.
For example, you need to match all open Service Requests that have a Services Needed of "Troubleshooting and Repair" or "Software Installation".
In this scenario, the original match is set to all and the grouping match is set to any. This means that records will display if:
-
Service Requests with a Status of “Open” AND
-
At least one match from this group:
-
Service Requests with a Services Needed that equals "Troubleshooting and Repair"
-
Service Request with a Services Needed that equals "Software Installation"
-
If you switch the matching, this will match for any of the first rules and must match the grouped rules. For example, if you want to see any records with Service Needed of either "Troubleshooting and Repair" or "Software Installation" or Service Requests that are "Open" with a Service Date of today.
This means that records will display if:
-
Service Requests with a Services Needed that equals "Troubleshooting and Repair" OR
-
Service Request with a Services Needed that equals "Software Installation" OR
-
All matches from the second group:
-
Service Requests with a status of “Open”
-
Service Requests with a Service Date of today
-
Sorting
Sorting determines the order in which records will be displayed. You can sort on most fields in two directions.
You can also add multiple sort rules if needed.
In the example below, the Service Request records are being sorted chronologically from oldest to newest:
Notes:
- Table sorting preferences do not apply to records displayed in a view in any manner. You can set a grid's sort order in the grid's settings in the Data section of the Builder.
- Tables' sort order applies to records displayed in connection field drop downs and the tables' record view in the Data section of the Builder.
- There is currently no way to sort records in a view while in the Live App other than clicking on the headers of fields and sorting by just one column.