Copy specific fields in a nested structure
Nested fields can be used to logically group fields together such as lists with a varying number of items, or forms within forms. There are a number of situations where a nested record needs to be copied, but the end user should be required to re-enter certain data.
A user who is responsible for inspecting the furnishings of a house has multiple bedrooms to inspect. The contents of each room are collected using a Nested Grid, so each piece of furniture is associated with a room. Each of the bedrooms contains many similar items, but the value of each piece of furniture varies, and must be entered. When the inspector clicks on the copy icon in the nested structure, a new record will be added, with the appropriate blank and copied fields.
- Customize the application
- In the Form section, create a new layout by clicking on the '+' sign in the top right corner
- Provide the layout with an appropriate name (e.g., 'Room copy') and click the 'Save' button
- Create a new field to contain the rooms and room contents. Select 'Nested grid field' in the 'Field type' dropdown
- Click the 'Customize nested form' button
- Create fields in the nested form. For each of the fields that should NOT be copied when a new item is added, set the 'Included' field attribute to 'No' for the new layout
- Save the nested form
- For the same nested field, set the 'Copy Filter Layout' dropdown to the new layout that you created
- Save the form, and publish the application