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

Save radio button selections by user

 

Patch(Regression,ThisItem,{TheRadio:YourRadioControl.Selected.Value})

This is my onchnage for radio button, 

ThisItem.TheRadio

 is the default and I added TheRadio to the data source to hold the responses. The issue is that this will save it for the entire app and I need it to do it for each users selection is this possible? If someone else were to open the app they would see my radio buttons how can I do this for each person. The reason I have this is so that upon filtering the radio selections don't change. This is what I have for my items in the filter Filter(
Regression,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
Function in ComboBox1.SelectedItems
) && If(
IsBlank(Filter.Text),
true,
Filter.Text in Country
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in 'Focus Topic'
)
)

14 REPLIES 14
Super User III
Super User III

Hi @powerapps890 ,

The code

Patch(
   Regression,
   ThisItem,
   {TheRadio:YourRadioControl.Selected.Value}
)

If run from (I assume) the OnChange of the Radio Control in the gallery, should update the field TheRadio in your list Regression the current item in the gallery to the value of YourRadioControl (I assume you have used this instead in the post instead of the actual name). Are you saying this is not working as it should?

Your filter is not relevant to the question - it is simply displaying records filtered on other fields.

It works, I am asking if you can save the selection by user. Because for example if you were to go into my app right now you would see what I clicked. That is not good because it should only show previous selections that you made not the radio buttons I chose. It is saving radio selections made by the app and not by person @WarrenBelz So somehow the persons email needs to play into this

@powerapps890 ,

Are you wanting to display only the records modified by the user? Do you have the user's email or name in the record or are you wanting to rely n the last person who modified it?

Yes I want to rely on the persons email. So that only that persons previous selection is shown when they open the app. @WarrenBelz  I have this Set(varUserEmail, User().Email);

Ok @powerapps890 ,

Try this

Filter(
   AddColumns(
      Regression,
      "Mod",
      'Modified By'.Email
   ),
   If(
      IsBlank(ComboBox1.Selected.Result) || 
	  ComboBox1.Selected.Result = "All",
      true,
      Function in ComboBox1.SelectedItems
   ) && 
   If(
      IsBlank(Filter.Text),
      true,
      Filter.Text in Country
   ) && 
   If(
      IsBlank(Search_.Text),
      true,
      Search_.Text in 'Focus Topic'
   ) &&
   Mod = varUserEmail
)

This should show only records where the current user was the last person to modify it.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @powerapps890 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

I am getting an error for onchange. It says that mod doesn't exist. @WarrenBelz 

@powerapps890 ,

Mod has to exist as you have added it as a column. What is the exact code you are using?

What you posted above 

Filter(
   AddColumns(
      Regression,
      "Mod",
      'Modified By'.Email
   ),
   If(
      IsBlank(ComboBox1.Selected.Result) || 
	  ComboBox1.Selected.Result = "All",
      true,
      Function in ComboBox1.SelectedItems
   ) && 
   If(
      IsBlank(Filter.Text),
      true,
      Filter.Text in Country
   ) && 
   If(
      IsBlank(Search_.Text),
      true,
      Search_.Text in 'Focus Topic'
   ) &&
   Mod = varUserEmail
)

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (42,940)