Prerequisites
- Create a model with the data you need. See our knowledge base article, Create a new model.
- Open an existing page or create a new one. See our knowledge base article, Add a new page and header.
Procedures
Add a Document viewer block to your page
-
- On your page, select ADD CONTENT, and in the Content dialog box, select the Document viewer block.
- Scroll down and in the Title box, give your calendar a meaningful name.
- From the Model list, select the model that has the file-type property you want to add.
- Select SAVE.
Configure your document viewer
- The Data source is the model you selected, but you can select a different one here or select the Create a new one link that redirects you to create a new model.
- From the Document file property list, select the file-type property in your model where you're storing your document.
- From the Document title property list, select the property that you want to use as the list item. The user selects this from the list to open the document attached to that record. This image shows a list of names, but you could have a list of months and display payslips.
- To sort the Document title property list items, from the Sort property list, select the property you want to sort by, and from the Sort direction list, select the direction you want to sort your list of documents.
- In the No items text editor, type in the text, you want to appear when there are no items to show.
Filter data items
DO NOT use this for access control because users can still access data through other means, for example, APIs.
Optionally, hide the data item on this page if the selected data meets these filter criteria. to restrict the data that the user can view, select the Filter data items option. The options vary depending on the property that you have chosen.
-
- Select the Filter data items option.
- Under the Advanced filters section:
- Meet ALL of the following conditions (and) - Hides the selected data when it meets every condition you add.
- Meet ANY of the following conditions (or) - Hides the selected data when it meets just one of several conditions.
- Under the relevant section, select "+".
- From the Property list, select the model's property.
- From the Criteria list, select the condition you want the property value to meet for the block to be hidden.
- In the Value box, enter the property's value you want the condition to meet for the block to be hidden.
Hide or show this block using filters
Show or hide this content block when certain conditions are met. For example, show to a manager but hide from a non-manager. You can base these filters on anything, such as job role, department, or location.
- Select the Hide or show this block using filters option.
- Under the Conditions section:
- Hide when ALL of the following conditions are met (and) - If you want to hide this block when the selected data meets every condition you add, add a condition under this section.
- Hide when ANY of the following conditions are met (or) - If you want to hide the block when the selected data meets just one of several conditions, add your conditions under this section.
- From the Property list, select the model's property.
- From the Criteria list, select the condition you want the property value to meet for the block to be hidden.
- In the Value box, enter the property's value you want the condition to meet for the block to be hidden.
- 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.
Finish
Once you have chosen your options, select UPDATE.