Low-code designer > App builder / Add a filter for users and app items on the item form

Add a filter for users and app items on the item form

If you have placed fields of the Users or App type on the form, you can specify which items will be available for employees to select. To do this, configure filtering using the Add filter option.

Suppose an employee specifies a customer from the Contacts app on the contract form. To narrow down the list of contacts and hide those that the employee should not see, you can set a filter in the field settings. For example, to show only contacts added to the system by the current user.

Set up the filter

As an example, let’s set up the conditions for selecting a contact person on the Contracts app item page. Set filters to specify only those records in the Contacts field added by the current user and where London is specified as the client’s address.

To do this:

  1. Go to the app form settings and select a property of the App type.
  2. In the window that opens, select the Add filter check box, and then click Add Conditions.

dynamic_filter1

  1. Click +Filter, then <Undefined>, and select a field from the list by which the items will be filtered. For example, let’s select the Author field as the filter from the properties of the Contacts app.
  2. Set the filter value. To do this, next to the Author field, check the Current user option.
  3. Add additional conditions. In our example, we will set the filtering by address and set London as a value.

dynamic_filter3

  1. Click Save.

In the same way, you can set up filtering by properties from the user page for the field of the Users type. For example, narrow down the list of employees by position or a certain group.

Export an app with a configured filter

When you export an app, the filtering conditions in the Add filter option are retained in the following cases:

  • If system components, such as system groups or system app fields, are specified as filtering values.
  • If the app with the filtering conditions and the associated app are part of the exported workspace or solution.

When you upload an app with a property of the Users type where a filter is configured, only the specified filter will be retained. Its value, which corresponds to the value of the field on the user page, will not be uploaded. To save the value in the filter, export the app as part of the configuration.

For example, to filter the users in the Responsible for payment field in an invoice, you have created a filter for the Position field. In it, you specified the Accountant record from the company’s org chart. When you export the Invoices app, the created filter will be saved for the Responsible for payment field, but a certain position will not be specified. You need to create the Accountant position in the new company’s org chart and re-configure the filter.