Overview
The Copy Field function in App Studio allows users to create an identical duplicate of an existing field with a new unique identifier. This is particularly useful for replicating fields that are very similar in purpose, improving development efficiency and reducing repetitive setup work.
Copying a field helps users:
Save time by replicating pre-configured fields.
Maintain consistency across fields of a similar type.
Accelerate the app development process with confidence of less misconfigurations to diagnose.
As an example use case you may have a number of questions in a Project Health Audit App that all require the User to enter an answer into a Range Field to score the Audit elements out of 5 in a Range Field. The benefit here is that we do not need to keep adding the Fields one by one stating that it is a Range Field, setting the minimum and maximum values and what the default should be. As well as being faster, the more questions there are the more this reduces the risk of missing setting a default score or miss-stating the range to score each Audit Element.
Accessing the Field Copy Feature
Open App Studio and find the Field that you would like to copy.
- Navigate to the Fields section of the Inputs & Layout folder and select the Field to Copy.
- At the bottom of the Screen click on the down arrow on the right of the Save button.
- In the options that come up select Copy.
Note: If you do not see the Copy option then contact your system administrator as it is likely that you are missing the Field Copy App Studio permission on your profile which they will be able to add for you.
In our use case, we have opened the first Project Health Audit question which has an Identifier of 'ScoreAA' referring to section A, question A. This has already been configured as a Range Field with min an max values reducing input to between 1 and 5 and a default value set of 1.
Our second question will have the same Field Parameters but a new Label and Identifier so we click on the Copy option to initiate the Copy.
Performing the Field Copy
When we click on the Copy option this will open a modal that we can set the Identifier of the New Field in.
- Enter the Identifier of the New Field
- Click on Ok to confirm and perform the Field Copy
- To cancel, either click Cancel or click outside the pop-up box.
For our Project Health Audit App the next question in Section A will have the Identifier ScoreAB so we type this in as the New Identifier and then click on Ok to copy the Field and take us through to look at the new Field.
Post Field Copy Behaviour
When you copy a Field, you will be taken through to the newly copied Field. You can double check this for piece of mind by looking at the Identifier. The back arrow at the top of the screen will take you to the copied Field but there is no link between the two, Each of the new Fields is an individual Field in it's own right.
Typically, there will be edits to make on the copied Field such as Label or Expression. You can work on these safe in the knowledge that the changes you are making will only take effect for the new Field and not the one that was copied.
Note: You will also see that this has triggered the 'App has unpublished changes' banner. As with all App Studio changes a Field Copy requires a publish before it takes effect in User Workspaces.
Completing our use case, we have copied our first Financial Health Audit Question Field 'ScoreAA' and are looking at our second Question Field 'ScoreAB'. We update the Label to be the new Question and all of the other Field parameters including Min Value, Max Value and Deafault Value are already defined for us. You can quickly see how with 20+ questions in the Audit this is a far quicker way to add New Fields.
Comments
0 comments
Please sign in to leave a comment.