Reset buttons were added to Calcapp years ago and have changed little since. You have been limited to either resetting all fields of the current screen or resetting all fields of the app. Also, resetting a field has always meant restoring its value to its initial value, never to a blank value.
Today, reset buttons finally become more customizable.
The IncludedFields property
In order for the formula to be picked up by Calcapp, you must configure your button to determine what fields to reset using a formula. Choose Select fields using formula from the drop-down menu in the inspector when your button is selected, and then on the fx button next to Included fields to edit the formula:
For instance, to reset Field1, Field2 and Field3, associate the following formula with the IncludedFields property:
Ranges enable a large number of fields to be referenced in a compact way. This formula resets the fields Field1 and Field5, as well as all fields that appear between them:
This formula resets Field1, Field3 and Field5, as well as the fields that appear between Field3 and Field5:
You can also reset all fields of a screen simply by referencing the
screen in the array, reset all fields of your app by referencing the
and conditionally reset fields using IF. You can even reference all fields
of a screen, and only reset those whose values are greater than 5
(say) using the FILTER function.
For more on how to use the IncludedFields property, including lots of examples, refer to our newly-expanded property documentation.
Resetting fields to blank values
What does it mean to reset a field? Up until today, it has meant setting its value to the same value the field had when it was first shown. If no initial value has been assigned, that is a blank value.
Many app authors found it puzzling to see the value revert to a prior value when the field was reset, though. Instead, they expected fields to lose their values, that is, be assigned blank values.
That behavior can now be realized by selecting Assign blank value in the inspector. The default remains Assign initial value.