Reset form on modal

I use modals to create records in a form.
This works fine, but in the modal I also call another modal to search a value.

This works fine, but when I open the modal the last input is still available.
No I created a workflow that will check how the modal is loaded. (From the New record button or from the search modal)
In the workflow I reset the value of all fields in the form.

This works, but is very labor intensive…
Is there an easier way of doing this?

Hey Nico! You can switch from modals to using the “tabs” component or use different pages. It should cut the build time substantially,

Hey Michael,

Probably missing some substantial information, but how would working with tabs, or pages help in resetting the data in a form?

Issue I’m having is when I create a new record a modal is opened. there is a form and when doing nothing this form is still showing the data of the previous record.
I can work around this with variables, but it would be easier if I could provide a command like reset(Form1)

Regards,
Nico

Oh, I just meant that the form could be outside of the modal (i.e. on a different tab or on a different page).

There is a better way to clear the form with “Component action”.

Here’s how to do it:

  1. Click on a button in your form that creates a new record to get into it’s settings.
  2. On the right side panel, click on the action that it does. Usually, it is named “Submit action, initial data”.
  3. On the right side panel now, switch over to the “Actions” tab. There you can perform actions after the initial action succeeds.
  4. Create a “Success action” that would use a “Component action”. Find your form in the list and choose “Clear form”.
  5. After you do all that, the form will be cleared each time a new row is created with that button.

Try that and see if it helps!