cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerapps890
Post Prodigy
Post Prodigy

Radio Buttons not submitting correct

I am getting an error upon submission. This is my submit button outside of the gallery orAll(
Gallery2.AllItems,
If(
!IsBlank(Radio4.Selected.Value),
Patch(
'DE Radio',
Defaults('DE Radio'),
{
Title:Namee,
Answer: Radio4.Selected.Value,
Name_:User().FullName,
Date:Today()
}
)
)
); I only want the selected radio buttons to be submitted. Namee is a text label in the gallery and its text is ThisItem.Namee, which has the name of each item I want to patch. I am getting an error that says that title is required but I have that. Additionally it is patching random radio buttons. When I do Title:Title it picks another text label ThisItem.Area why does it choose this as the title?

80 REPLIES 80

Filter(
collGUATMasterData,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
System in ComboBox1.SelectedItems
) && If(
IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All",
true,
Scenario in ComboBox1_2.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
) && If(
IsBlank(ComboBox1_1.Selected),
true,
Radio in ComboBox1_1.SelectedItems.Value
)
). This is the items the last combobox doesn't filter correctly anymore either. 

@powerapps890 

Okay, let's clean up the formula a bit to this:

Filter(
    collGUATMasterData, 
    (IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All" || System in ComboBox1.SelectedItems) &&
    (IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All" || Scenario in ComboBox1_2.SelectedItems) &&
    (IsBlank(Search_.Text) || Search_.Text in Namee) &&
    (IsBlank(ComboBox1_1.Selected) || Radio in ComboBox1_1.SelectedItems)
)

And next...

1) I thought you were basing this off of the datasource and not a collection?  If a collection, you will HAVE to refresh your collection EVERYTIME you change the datasource.  If you base off of the datasource, you will not.

2) Before, your Radio OnChange was updating the GUTAresponses...in your formula now, you are filtering on the Radio column of the GUTA list.  You really should not have a Radio column in your source list any longer as that is now being stored in the GUTAresponses list.  Filtering on the GUTA list is not going to give you any results that you want as that is common to everyone.  Your responses list is individual to the user.

3)  A question - do you have anything else that relies on the "signature" of this Gallery?  Anything that you pass a "ThisItem" to or that relies on a Gallery.Selected property?  If not, then we can proceed forward with adding the lookup to your Items formula.

 

That would look like this:

Filter(
    AddColumns(
        GUAT, 
        "valRadio", Lookup(GUTAresponses, userEmail=vUserEmail && GUTAlistID-ID)
    ),
    (IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All" || System in ComboBox1.SelectedItems) &&
    (IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All" || Scenario in ComboBox1_2.SelectedItems) &&
    (IsBlank(Search_.Text) || Search_.Text in Namee) &&
    (IsBlank(ComboBox1_1.Selected) || valRadio in ComboBox1_1.SelectedItems)
)

In this formula, we get the items from the GUAT list and then lookup the individual user responses from the GUTAresponses list.  Finally, we filter on the valRadio column - this will have the individual result. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

No,  I don't think there is anything that relies on the signature. I don't need to use a collection we can just use GUAT. This is what happened when I changed the items. Capture.PNG@RandyHayes 

@powerapps890 
Ooops, change that to ComboBox1_1.SelectedItems.Value

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Capture.PNG@RandyHayes  I am still getting some errors. 

@powerapps890 

Double oops...<smacking my forehead>

What it was is that I forgot the actual RadioValue from the responses in the AddColumns.  valRadio would have been a record and sure enough, that would not have worked.

Corrected formula:

Filter(
    AddColumns(
        GUAT, 
        "valRadio", Lookup(GUTAresponses, userEmail=vUserEmail && GUTAlistID-ID, RadioValue)
    ),
    (IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All" || System in ComboBox1.SelectedItems) &&
    (IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All" || Scenario in ComboBox1_2.SelectedItems) &&
    (IsBlank(Search_.Text) || Search_.Text in Namee) &&
    (IsBlank(ComboBox1_1.Selected) || valRadio in ComboBox1_1.SelectedItems.Value)
)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

There are no errors, but now the radio combobox doesn't work at all @RandyHayes 

@powerapps890 

Are you allowing for blank/no selection in your combobox, or is there a value in it?

When there is no value in the combobox, do any rows show or is the gallery blank?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

When there is no selection all of the radio buttons are shown. There is no option for blank in the combobox, the user can either pick works, issues or fails. @RandyHayes 

@powerapps890 

A little confused - I thought you originally wanted to be able to select any or all "works" "issues" or "fails" (i.e see all the "Works" and "Fails")

And then, if you didn't want to be specific to a condition, then no selection.

 

You state that there is no blank selection - what I mean by that is that nothing is selected.  You do have that option.

 

Place a Label in your Gallery and set the text property to : ThisItem.valRadio

Let's see if we are getting what we expect.

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (28,439)