Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Clear Radio Button

(2) ShareShare
ReportReport
Posted on by 1,069

I have (30) Radio Button controls with the same quantity of related text labels in a form.  If a user inadvertently selects a radio button (but does not have text in the related field), I was trying to reset the radio buttons with form submittal.  Following is a test I was trying on a single radio button.

If(
    IsBlank(
        DataCardValue11.Text,
        Reset(Radio1_3),)
    );
    SubmitForm(frmSODataEntry)
)
A couple of questions...
1.  Initially I have not been able to get the format correct.  If text field is empty, reset radio button else do nothing.  I continue to receive an "Invalid Number of Arguments".  Is that related to my "do nothing"?
2.  Is this the efficient way to accomplish or should I use different logic?
  • DannyBarberUK Profile Picture
    DannyBarberUK 3 on at
    Clear Radio Button
    Is a radio button the best option for the form?
    Is it possible to add a N/A button.
  • jdanney701 Profile Picture
    jdanney701 8 on at
    Clear Radio Button
    did you ever fix this issue? im trying to do something similar, only i have a form with 8 radio buttons. i want to reset all the radio buttons and submit form. ive also tried
     
    ResetForm(Myform);
    SubmitForm(Myform)
     
    but this wont reset the radio buttons either. It just displays what is saved in the sharepoint list
  • RJF61 Profile Picture
    RJF61 1,069 on at
    Re: Clear Radio Button

    @mmbr1606 No resetting the whole form is not wanted.  Essentially I'm trying to address errors made by users that accidently select a Radio Button.

     

    An error scenario would include entry of text and the related radio button.  Then the user decides to deleted the text but cannot clear the button. 

  • mmbr1606 Profile Picture
    mmbr1606 10,450 on at
    Re: Clear Radio Button

    Just a follow up question, resetting the whole Form is not an option right?

  • RJF61 Profile Picture
    RJF61 1,069 on at
    Re: Clear Radio Button

    Hi @mmbr1606 Thanks for the response.  I tried your suggestion and then received...

    "The reset function can only be used with a resettable control.  Controls within a Form or Gallery control can only be reset from within the same form or gallery template."  

  • mmbr1606 Profile Picture
    mmbr1606 10,450 on at
    Re: Clear Radio Button

    hey @RJF61 

     

    try this please:

    If(
     IsBlank(DataCardValue11.Text),
     Reset(Radio1_3);
     SubmitForm(frmSODataEntry),
     SubmitForm(frmSODataEntry)
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard