cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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.

Highlighted

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

Highlighted

@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?

Highlighted

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);

Highlighted

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.

Highlighted

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.

Highlighted

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

Highlighted

@powerapps890 ,

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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,723)