Skip to main content

Notifications

Power Apps Pro Dev & ISV
Suggested answer

How to reset the radiocanvas1 in gallery

Posted on by 44
Hi,
 
May I know how to compose a code with my Powerapps. 
 
I have a gallery with radiocanvas1. I want to create a trigger when I click the submit button the radiocanvas1 value will reset. 
 
 
Please see the function of Submit Button. 
 
 
The goal is when I click the submit button the value of RadioCanvas1 will back to default value. 
 
 
Thank you
  • Suggested answer
    Nandit Profile Picture
    Nandit 348 on at
    How to reset the radiocanvas1 in gallery
    Hi daywalker_567,
     
    Instead of Reset(GCGIntranetQuizGal) you can use the following and it should be able to reset your Radio buttons control to default values.
    Reset(DataSource)
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
  • CA1105 Profile Picture
    CA1105 101 on at
    How to reset the radiocanvas1 in gallery
    Did you try resetting the gallery first?
  • Suggested answer
    Nandit Profile Picture
    Nandit 348 on at
    How to reset the radiocanvas1 in gallery
     
    Instead of Reset(GCGIntranetQuizGal), you can add the following at the end of your code and it will work to reset your Radio buttons to default values. 
    Refresh(DataSource)
    Hope it helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
  • Suggested answer
    scalca Profile Picture
    scalca 122 on at
    How to reset the radiocanvas1 in gallery
    you have to define the DefaultSelectedItems property in case you are using the modern radio button control
    or the Default property in case you are using the classic one
     
     
  • Suggested answer
    DBO_DV Profile Picture
    DBO_DV 3,488 on at
    How to reset the radiocanvas1 in gallery

    Hi,

    To achieve your goal of resetting the value of RadioCanvas1 when you click the submit button, here's what you need to do:

    1. Submit Button:
      Add the following code to your Submit Button's OnSelect property:

      Set(varReset, true);
      Set(varReset, false);

      This will trigger the reset.

    2. Gallery:
      In your gallery, you need to add a Toggle control (use the classic look, as the modern toggle won't work for this).

    3. Default Property of the Toggle:
      Set the Default property of the Toggle to the variable varReset we created in the Submit Button:

      varReset
    4. OnChange Property of the Toggle:
      In the OnChange property of the Toggle, add the following code to reset the RadioCanvas1:

      Reset(RadioGroupCanvas2);
    5. Make the Toggle Invisible:
      Once configured, you can set the Toggle's Visible property to false so it won't be shown to the user.

    If this solution helped you, please consider accepting it as the solution and giving it a like to support each other and help others find the answer!

    Thanks! 

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,719

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard