Custom View Tutorial 2

Custom View options

In the previous tutorial, we left out explanations of the "Enable pagination" and the "Filter and Sort" options of the Custom View settings. You need to be aware of these settings when you want to include record data in your Custom View, other than the HTML you have set.

In this tutorial, we will briefly go through the changes that are made to the Custom View when these settings are tweaked.

The Enable Pagination option

First, let's look at the effects of checking the "Enable pagination" option.
Here is a Custom View with the "Enable pagination" settings turned off.




And here is a Custom View with the "Enable pagination" settings turned on



The latter displays the number of records that are inside the App, on the right hand side. If the App holds more than 100 records, it also displays a clickable pagination arrow.



Apart from the UI, there is also a difference in the Event object of the Record List Events.
To see the difference,let's apply the below JavaScript code to the App's JavaScript and CSS Customization settings. This code will display the contents of the Event object of the Record List page into the developer console.

Here is what's shown in the console when the "Enable pagination" settings turned off.


Here is what's shown in the developer console when the "Enable pagination" settings turned on.

With the "Enable pagination" settings turned off, the Event object contains no record data. But with the settings turned on, the Event object now contains record data. This might sound a bit strange, as there are no records that are displayed on this page - but think of it as the Event object is holding onto your record data, and it's just not displaying it on the page.

In the above example, data of 100 records are stored in the Event object. Clicking on the pagination arrow would cause the event to trigger again, and the next set of records (in this case, 27 records) will be contained in the Event object.

You can use these values in the event object together with JavaScript to display them in a style of your choice into the HTML you have written.

More on how to do this will be explained in the next tutorial.

The Filter and Sort option

The Filter and Sort option works in the same way as they would work on a normal List View. They filter out the records that you need, and order them in a way of your choice. This filter and order is applied to the records inside the Event object.


We hope this tutorial has avoided some confusion in the Custom View settings. Whether you would need this pagination setting would depend on how you would like to structure your Custom View. Later tutorials will go through how to display the record data of your App into the Custom View.




<<< Go back to Custom View Tutorial 1

Was this article helpful?
0 out of 1 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!