Low-Code Designer > Apps > App Builder / Default Values for New Items

Default Values for New Items

An app may include fields, in which users can create items of other apps. You can configure such fields so that when a user creates an app item, all or some of its fields will be pre-filled with values. For example, if there are certificates that belong to a certain contract, they can be created right from the contract page, and such data as the contract number and contractor will be filled in automatically.

Configuring default values

Let's configure the form of the Contracts app. Add an app field to the form and select the Certificates app. Note that the fields of other types cannot be configured in this manner.

Click Default values for new items.

Screen_Shot_01-22-19_at_09.16_AM.PNG

Now set up the fields that you want to be filled in automatically. Select a field in the Certificates column and add a corresponding field in the Parent element column. In our case, the parent element is the contract.

For example, the Certificates app has the Contract number field that should contain the number of the corresponding contract. Add this field to the Certificates column. In the Parent element column, select the Contract number field of the Contracts app.  

In the same way, set up all the fields that you need and click Save.

2.PNG

Now users will be able to create certificates related to a contract right from the contract's page, and these fields will be filled in automatically.

Creating an item with prefilled fields

Open the creation page or editing page of the Contract item, make sure that all the necessary fields are filled in and click Create to the right of the Certificates field.

4.PNG

The certificate creation page will open. All the fields that you have specified above will be pre-filled according to the contract data. You can edit them if you like.

3.PNG

Click Save to create the certificate.

You can create several certificates. They will all be added to the Certificates workspace and will also be displayed on the contract's page.

5.PNG

At any moment you can delete or edit the certificates, for example, add a file.