Create Form Activity - Reset

I have created a form using “Create Form” designer. I have a drop down/ and 2 text fields along with one submit button and reset button.

if Submit button is clicked, i am able to get the data and the application is getting closed. (which is expected). If Reset button is clicked, i need to empty all those variables filled in the form to be empty.

Not sure about any json scripts or custom activities. Whats the best way to do in here?

@Pradeep.Robot If you are using a Switch Activity Inside a Form, you can make the Form do those Actions in the Separate Cases, So a Case for Submit and a Case for Reset should be created.

Inside the Reset Case, You can use the Assign Activity and make all the variables set to Null or an Empty String.

You can check this post for a Similar Action using Switch :

1 Like

Thanks much for the link ! will look in to it.

1 Like

Sorry to bother, Do you have any sample xaml to refresh the value or reset to empty?

@Pradeep.Robot Check this Workflow :
FormActivity.xaml (20.3 KB)

1 Like

Thanks much. I see the exact way i wanted. It helps. One more doubt, Say if i have to return a form on a submit (i can provide a new form on the switch case when it submit button is selected). Is it possible to provide a form with a drop down based on a input i receive from database? say for eg. In your workflow, i retrieve a country list from db like (India, Malaysia, America, London) from a db call. How can i show the values in the next form? if so, how that input should be passed? like a collection/list something?

@Pradeep.Robot I already have a workflow which you can use to understand How to pass the list type of values as a dropdown in form. It should be enough to implement in the mentioned way. Let me know if it didn’t work out.
CustomForm_DropdownInput_Example.zip (22.5 KB)

1 Like

Thank you ! It works as expected :slight_smile: Happy Automation… Cheers :v:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.