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 / Radio button and selec...
Power Apps
Answered

Radio button and selection box

(0) ShareShare
ReportReport
Posted on by

Good night,
I have a form where I need to save the selection of boxes, radio button for each record. At the time of selecting a record in Gallery it has the boxes selected at the time it was created.

Capture5.PNG
Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @CarlosN ,

    Do you want to save the selections of checkboxes and Radio buttons back to your data source?

     

    Based on the needs that you mentioned, I afraid that the SubmitForm function could not achieve your needs. Instead, please consider use Patch function to submit your form data.

     

    In order to save the selections of checkboxes and Radio buttons back to your data source for each record, you need to create corresponding columns in your data source to store these selections.

    For the two radio buttons in your form, please create two individual Text columns in your SP List to store the Radio button selection. Then set the Default property of the two Radio buttons to following formula separately:

     

    Gallery1.Selected.RadioColumn1
    Gallery1.Selected.RadioColumn2

     

     

    For these Checkbox controls in your Form, you could consider group them into three categories. First Category (MODIF & ENSAYO), Second Category (ESTILO ~ IMPRESION), Third Category (Cotizacion ~ Ficha Tecnica). And within your data source, you need to create one individual Text type column for each Category to store the checkbox selections. e.g. For Category1 (MODIF & ENSAYO), if you want to collect the selections, please use the following formula:

     

    Concatenate(
     If(
     MODIF_Checkbox.Value = true,
     "MODIF;",
     Blank()
     ),
     If(
     ENSAYO_Checkbox.Value = true,
     "ENSAYO;",
     Blank()
     )
    )

     

    Set the Default property of the MODIF Checkbox to following:

     

    If(
     "MODIF" in Gallery1.Selected.Category1,
     true,
     false
    )

     

    Set the Default property of the ENSAYO Checkbox to following:

     

    If(
     "ENSAYO" in Gallery1.Selected.Category1,
     true,
     false
    )

     

    similar logic should be applied to the rest of two Categories.

     

     

    You should use the following Patch formula to patch form data back to your SP List:

     

    Patch(
     'Your Data Source',
     Defaults('Your Data Source'),
     {
     RadioColumn1: Radio1.Selected.Value,
     RadioColumn2: Radio2.Selected.Value,
     Category1: Concatenate(
     If(
     MODIF_Checkbox.Value = true,
     "MODIF;",
     Blank()
     ),
     If(
     ENSAYO_Checkbox.Value = true,
     "ENSAYO;",
     Blank()
     )
     ),
     Category2: Concatenate(
     If(
     ESTILO_Checkbox.Value = true,
     "ESTILO;",
     Blank()
     ),
     If(
     PEGUE_Checkbox.Value = true,
     "PEGUE;",
     Blank()
     ),
     ...
     ...,
     If(
     IMPRESION_Checkbox.Value = true,
     "IMPRESION;",
     Blank()
     )
     ),
     Category3: Concatenate(
     If(
     Cotizacion_Checkbox.Value = true,
     "Cotizacion;",
     Blank()
     ),
     If(
     Muestra_Checkbox.Value = true,
     "Muestra;",
     Blank()
     ),
     If(
     FichaTecnica_Checkbox.Value = true,
     "Ficha Tecnica;",
     Blank()
     )
     )
     }
    )

     

    Note: The Category column name, Radio column name is dependent on your needs, you could customize it as your needs.

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • CarlosN Profile Picture
    on at

    Thanks,

    Excellent answer.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard