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.
Procedure
- 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.
- Optionally, 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.
Warning
DO NOT use this for access control because users can still access data through other means, for example, APIs.
Hide data item on this page if the selected data meets these filter criteria.
If you want to hide the selected data when it meets every condition you add, add a condition under the Meet ALL of the following conditions (and) section. Otherwise, if you want to hide the selected data when it meets just one of several conditions, add your conditions under the Meet ANY of the following conditions (or) section.
- 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.
- Under the relevant section, select
-
Restrict or allow viewing further by adding custom filters to your block. You can base these filters on anything such as role type, department, or location. Select the Hide or show this block using filters option and set your Conditions.
If you want to hide this block when the selected data meets every condition you add, add a condition under the Hide when ALL of the following conditions are met (and) section. Otherwise, if you want to hide the block when the selected data meets just one of several conditions, add your conditions under the Hide when ANY of the following conditions are met (or) section.
- Under the relevant section, select
.
- From the Property list, select the model's property.
Tip
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.
- 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.
Tip
- For lookup properties, you can select a lookup option entered when you added the property to the model.
- 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.
- Under the relevant section, select
- When you are happy with your settings, select UPDATE.
Comments
0 comments
Article is closed for comments.