Skip to main content

Notifications

Community site session details

Community site session details

Session Id : MmktmkTtsO6CzP1bzN9W/I
Power Apps - Microsoft Dataverse
Answered

Rest Form Fields

Like (0) ShareShare
ReportReport
Posted on 3 Sep 2020 23:47:29 by 52

How can I reset Individual form fields without using the resetform() function. I just want to reset individual fields after adding it to a collection. 

If possibly how could I reset the form after saving the data to a collection. (Not submission). The submission button is on the collections screen where I view the entered data in a gallery format. 

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 14 Sep 2020 at 08:19:42
    Re: Rest Form Fields

    Hi@JRobinson12,

    Based on your needs, you could add several buttons to reset it when you have already seen what you have entered within.

    Do you mean that:

    1. No ResetForm() function
    2. Reset some certain fields after adding them to a collection
    3. The user could see what they have entered before they press the save button

    If you want 2/3 form fields to be reset when the save button is clicked, I am afraid there is no way to achieve this currently.

    If you just want to reset 2/3 form fields, you should insert the Button into every data card that you want to reset as follows:

    002.png

    Set the OnSelect property of the Button6 as below:

     

    Collect(ColForm,DataCardValue9.Text);Reset(DataCardValue9)

     

    Set the OnSelect property of the Button7 as below:

     

    Collect(ColForm,DataCardValue12.Selected.Value);Reset(DataCardValue12)

     

    Best Regards,

    Qi

  • JRobinson12 Profile Picture
    52 on 04 Sep 2020 at 15:22:22
    Re: Rest Form Fields

    This works but not how I would want it too. In your solution, the reset happens before the save button is pressed. This doesn’t allow the user to see what they have entered before pressing the save button. Is there a way to reset on save button without using the resetform() function as that would reset all fields. I just want 2/3 form fields to be reset when the save button is clicked 

  • v-qiaqi@microsoft.com Profile Picture
    on 04 Sep 2020 at 04:42:33
    Re: Rest Form Fields

    Hi@JRobinson12,

    Combine that with your description, I want to explain the following to you first:

    1. You can set the OnChange property of the TextInput to collect entries, and then reset it, this could work without a Button
    2. If you want to achieve this in Dropdown, you can achieve this in the same way. Set the OnChange property of the Dropdown as below:

     

    Collect(ColForm,DataCardValue12.Selected.Value);Reset(DataCardValue12)

     

    Set the Default property of your Dropdown as below:

     

    ""

     

    If you have a ComboBox, you should set the DefaultSelectedItems property as below:

     

    [""]

     

    After that, you can clear all the fields content before submitting your form.

    0904Gif1.gif

    Best Regards, 

    Qi

  • JRobinson12 Profile Picture
    52 on 04 Sep 2020 at 03:42:32
    Re: Rest Form Fields

    The form consist of text input and dropdown. Efficiently I would like to clear certain fields when I click the save to collection button. But if not possible,a simple clear button beside the field I want to clean is just fine as well. 

  • v-qiaqi@microsoft.com Profile Picture
    on 04 Sep 2020 at 02:30:40
    Re: Rest Form Fields

    Hi@JRobinson12,

    Based on the issue that you mentioned, do you want to clear the form Individual field content once collect it to a collection?

    Could you please share a bit more about your scenario, is this all Text fields?

    I have a test on my side, there are several Text fields within my Form.

    I assume that your fields are all Text type, Collect() and Reset() could achieve your needs.

    Set the OnChange property of the TextInput control within the corresponding Text DataCard as below:

     

    Collect(ColForm,DataCardValue9.Text);Reset(DataCardValue9)

     

    Note: DataCardValue9 represents the TextInput control within the corresponding Text DataCard.

    If you have some complex type fields within your data source, like Choice or something else, you could consider using ResetForm() function. Considering you want to Submit as well, you can add ResetForm() function to the OnSelect property of the Submit Button as below:

     

    SubmitForm(EditForm1);ResetForm(EditForm1)

     

    Best Regards,

    Qi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
SadFox Profile Picture

SadFox 2

#1
CU06052020-0 Profile Picture

CU06052020-0 2

#1
stampcoin Profile Picture

stampcoin 2

Overall leaderboard

Featured topics

Loading started