Prerequisites
- Open an existing page or create a new one. For example, see our knowledge base article, Add a new page.
Procedure
Add a list block to your page
- On your page, select ADD CONTENT, and in the Content dialog box, select the List block.
- Scroll down, and in the Title box, give your list a meaningful name.
- From the Model list, select the model whose data you want to appear in the list.
If you select a model linked to the Task model by a foreign key, you can show the tasks in the list by selecting the Configure the list settings to automatically show task information from the foreign key relationship option.
- Select SAVE.
Filter data items
DO NOT use the filter for access control because users can still access data through other means, for example, APIs. See our knowledge base article, Add an access control policy.
- You can optionally restrict the user's data in this block. Otherwise, select CONTINUE and skip to the next section.
- Select the Filter data items option and under the Filter data items section, choose what you want to do:
- Meet ALL of the following conditions (and) - If you want to hide the selected data when it meets every condition you add, add a condition under this section.
- Meet ANY of the following conditions (or) - If you want to hide the selected data when it meets just one of several conditions, add your conditions under this section.
- From the Property list, select the model's property. The next options vary, depending on the property that you have chosen.
- To pass is the Object ID so that the data is relevant, you can choose the settings:
- Property: "Id"
- Criteria: "is any of"
- Value: "objected"
- For example, you choose the "Id" Property "is any of" the Value "objectId" to only view data based on the signed-in user, or change to "is not any of" to prevent the user from viewing data based on the signed-in user.
- To pass is the Object ID so that the data is relevant, you can choose the settings:
Be careful when selecting properties. You can't use a property with a large amount of text, such as a Description, if any property values exceed the limit for using a property as a filter. You can try to shorten the property values and try the next day again.
- From the Criteria list, select the condition you want the property value to meet to hide the block from the page.
- In the Value box, enter the property's value that you want the condition to meet to hide the block from the page.
- For lookup properties, you can select a lookup option.
- For foreign key properties, you can select any values against the default label property of the linked model. However, if there is nothing to select, there might not be any values for the property.
Sort your data items
- Select the Sort data items option that you want to use:
- No sort: Doesn't sort the list items in any order.
- AI-Recommended: Only select this if you are going to add the Sorting feature to your list. See the knowledge base article, Configure the Searching, sorting, and filtering features. Gives the user a recommended sort function:
- Custom sort order:
- From the Property list, select the property by which you want to sort.
- From the Order list, select if you want to sort the properties in either "Ascending" or "Descending" order.
- Select CONTINUE and proceed to design the layout of your list. See our knowledge base article, Design your list.