3354
Views
7
Comments
Solved
How does one reset a form?
Question

Would I have to assign all form widgets to null individually?

2024-03-14 14-46-22
Nelson Inácio
Solution

If for example you want to clear search filters you have to assign each one to null value.

Give some more details of what you are trying to do.

UserImage.jpg
Rogier Sluimers

Nelson Inácio wrote:

If for example you want to clear search filters you have to assign each one to null value.

Give some more details of what you are trying to do.

That's exactly what I want to do. Clear all form widgets. I was hoping there would be a single server action for clearing a form.


2024-03-14 14-46-22
Nelson Inácio

If you want to clear a edit record you need to create a record variable of same type and assign it to the widget.

If you want to clear a list records or table records you have to create a list variable of same type and assign it to table records list.

2022-07-07 18-45-50
Niels Favreau

What you could do is create a record : ContactEmpty.

If you want to clear the form, instead of assigning each variable individualy, you could do : 

Contact = ContactEmpty

(the variable your form is binded with)

2024-03-14 14-46-22
Nelson Inácio

If you have many filters on a screen instead of creating several variables, create a structure and then you can clear it like a record

2019-03-06 09-09-42
Kalaivanan

Hi All,

Select the designation source to current screen and pass the input parameter to NullIdentifier() to that screen.


This will clear form elements in the screen.

UserImage.jpg
MAJED AlANAZI

You can clean the Structure easily by just following these steps:

  1. Create a client action with a local variable of the same data type as the Structure you want.
  2. Add an assignment on clear client action. In the Variable field, add the Structure you want to clear, and in the Value field, select the local variable from the same client action.

This way, you can use it wherever you want.
For Example:

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.