RESET.BLANK function

RESET.BLANK(First, Other..., IncludePersistentFields?) RESET.BLANK(First; Other...; IncludePersistentFields?)

First

? or { ? }

The first parameter. { Field1, Field2 }{ Field1; Field2 } resets Field1 and Field2. Field1:Field100Field1:Field100 resets Field1, Field100 and all fields that appear between them. AppApp resets all the fields of the app. { Field1, MainScreen, FormGroup1 }{ Field1; MainScreen; FormGroup1 } resets Field1, all the fields of the screen MainScreen and all the fields of the form group FormGroup1.

FILTER(Field1:Field5, (Field1:Field5).Visible)FILTER(Field1:Field5; (Field1:Field5),Visible)} potentially resets Field1, Field5 and all fields that appear between them, but ultimately only resets those that are visible. Similarly, FILTER(Field1:Field5, Field1:Field5 > 4)FILTER(Field1:Field5; Field1:Field5 > 4)} only resets those fields whose values are greater than 4.

Fields included here are not reset if they are persistent and the IncludePersistentFields parameter is FALSE.

Other

? or { ? } (accepts many)

Additional parameters. Fields to reset can either be included in an array, or be passed as separate parameters. Refer to the documentation of the First parameter for details.

IncludePersistentFields

Logical (optional)

Whether persistent fields should be reset. If omitted, TRUE is assumed.

Returns

Nothing

This function does not return a value.

Resets fields to blank values. RESET.BLANK(Field1)RESET.BLANK(Field1) resets Field1 by assigning a blank value to its value.

This function can only be used from an action formula. It is typically invoked from a formula associated with the OnPress property of a formula button.

Assigning a blank value to a field using the := operator and invoking this method have the same effect. As such, these formulas are equivalent:

RESET.BLANK(Field1)RESET.BLANK(Field1)
Field1 := BLANK()Field1 := BLANK()

Use RESET instead to reset fields to their initial values.

Resetting multiple values

Unlike assigning the blank value to a field, effectively resetting it, the RESET.BLANK function can reset multiple values:

RESET.BLANK(Field1, Field2, Field3)RESET.BLANK(Field1; Field2; Field3)
RESET.BLANK(Field1:Field100)RESET.BLANK(Field1:Field100)

The first formula above resets only Field1, Field2 and Field3. The second formula resets Field1, Field100 and all fields that appear between them.

RESET.BLANK can also reset all fields of a form group, a screen, or even the entire app. This formula resets all fields of the screen MainScreen, as well as Field1:

RESET.BLANK(MainScreen, Field1)RESET.BLANK(MainScreen; Field1)

This formula resets all fields of the entire app:

RESET.BLANK(App)RESET.BLANK(App)

Resetting only fields satisfying certain conditions

Using FILTER and properties such as App.Fields, FormScreen.Fields and FormGroup.Fields, only fields satisfying certain conditions can be reset.

This formula resets all visible fields of the app:

RESET.BLANK(FILTER(App.Fields, App.Fields.Visible))RESET.BLANK(FILTER(App,Fields; App,Fields,Visible))

This formula resets all fields which are visible and have negative values:

RESET.BLANK(FILTER(App.Fields, App.Fields.Visible && (App.Fields < 0)))RESET.BLANK(FILTER(App,Fields; App,Fields,Visible && (App,Fields < 0)))

Refer to the documentation for the IncludedFields property of reset buttons for more examples.

Examples

RESET.BLANK(Field1)RESET.BLANK(Field1)

Resets Field1 by assigning a blank value to its value.

RESET.BLANK(App)RESET.BLANK(App)

Resets all fields of the entire app. Providing App as a parameter resets all fields of the entire app. Providing a form screen as a parameter resets all fields of that form screen. Finally, providing a form group as a parameter resets all fields of that form group.

RESET.BLANK(App, IncludePersistentFields: FALSE)RESET.BLANK(App; IncludePersistentFields: FALSE)

Resets all fields of the entire app, but not persistent fields. This formula sets the last parameter of RESET.BLANK to FALSE to exclude persistent fields.

RESET.BLANK(FILTER(App.Fields, !App.Fields.Persistent))RESET.BLANK(FILTER(App,Fields; !App,Fields,Persistent))

Resets all fields of the entire app, but not persistent fields. This formula uses FILTER and the App.Fields property to remove fields that are persistent from consideration before handing this array to RESET.

RESET.BLANK(FILTER(MainScreen.Fields, F -> F.Visible && F < 0))RESET.BLANK(FILTER(MainScreen,Fields; F -> F,Visible && F < 0))

Resets all fields of the screen MainScreen which are visible and have values which are negative. -> is used to rename the Element value set by FILTER to F.