web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch a Radio option Help
Power Apps
Answered

Patch a Radio option Help

(0) ShareShare
ReportReport
Posted on by 10

Hi everyone,

 

Pretty new here with PowerApps, Im trying to create a form through a template Microsoft offer you to start. Everything works fine except when I try to "Submit" the information to the excell (The datasource). 

 

The problem seems to be the Radio option, it does not give me an error, just doesnt show anything, below is my code for the "Submit" button:

 

Patch(Responses,Defaults(Responses),
{ ResponseId:CountRows(Responses)+1},
{ Answer1:Radio1.SelectedText.OptionText}
);

Navigate(Done, ScreenTransition.Fade)

I have more answers and they works fine, they stored the info back in the excel when I pressed the "Submit" button.


The Radio1 its just a "Choose" between 6 options. It doesnt display any errors so im confusing what im doing wrong and how to store the selected option of this Radio back to the excell, the column "Answer1"of this excell is "Text".

Hopes someone can help me, I have been struggling with these for two days....

 

Thank you in advance.

Categories:
  • eka24 Profile Picture
    20,925 on at

    Try:

     

    Patch(Responses,Defaults(Responses),
    { ResponseId:CountRows(Responses)+1},
    { Answer1:Radio1.Selected.Value});
    Navigate(Done, ScreenTransition.Fade)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • ICRdatalover1 Profile Picture
    10 on at

    Hi @eka24 , 

     

    Thanks for the fast reply. Unfortunately does not work. Now it gives this error:

    "The type of this argument "Answer1" does not match the expected type "text", found type "Error".

     

    The Radio Im trying to use have 6  different options to choose, they are text, the code of the Radio is on the image.

     

    Thank you in advance.

     
    2020-06-22 15_12_53-Kudos App Demo 1 - Saved (Unpublished) - Power Apps.jpg
  • eka24 Profile Picture
    20,925 on at

    show a screen shot of the formula with the error.

    Patch(Responses,Defaults(Responses),
    { ResponseId:CountRows(Responses)+1,
    Answer1:Radio1.Selected.Value});
    Navigate(Done, ScreenTransition.Fade)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • ICRdatalover1 Profile Picture
    10 on at

    Hi, here is the error with the ".Value"

     

    ICRdatalover1_2-1592835278319.png

     

    Thank you in advance

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @ICRdatalover1 ,

     

    Your original code is perfect, I think the problem is from Reset property of Radio.

    You set the Reset property of Radio to Button3_4.Pressed, but the Button3_4 is to Patch data to excel, so every time you click on the Button3_4, Radio control is reset and nothing can be saved in Excel.

    Please try to clear the Reset property and try again to see if the issue is fixed.

    Hope this helps.

    Sik

  • ICRdatalover1 Profile Picture
    10 on at

    Hi @v-siky-msft ,

     

    That was brilliant and exacly the problem, now it works perfect. Thanks so much really appreciated. 

     

    But now how can I reset the whole form?? Is there any other way??

     

    Thanks again!!

     

    Kind regards

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @ICRdatalover1 ,

     

    If you want to reset the whole Form, try with ResetForm() function.

    Reference: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-form 

    Sik

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard