cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Matt68
Level: Powered On

Adding a radio control in a gallery

Hello,

 

I would like to add a radio control in a gallery with a database on excel.

 

Capture3.PNG

When we test this application, we got a problem. The radio doesn't save his position, it is reset when we come back in this page.

Can someone send us the command we should use. We think we should use the patch command, we are not sure.

 

Best regards.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Adding a radio control in a gallery

@Matt68 

If you're going to migrate off of Excel, your next step up would be SharePoint.  After that, SQL.  

Access plays no part of anything, so don't consider that.

Most all will have some latency issues, Excel will be the worse.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
6 REPLIES 6
Community Support Team
Community Support Team

Re: Adding a radio control in a gallery

Hi @Matt68 ,

 

What is the Items and Default property of this radio control? How the value shows depends on what you set in the Default property. 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Matt68
Level: Powered On

Re: Adding a radio control in a gallery

Hello @v-monli-msft,

 

We put "Thisitem.Etat" in the default property.

 

"Etat" is a column in excel, Excel say us, if it's "true" or "false".

Matt68
Level: Powered On

Re: Adding a radio control in a gallery

Sorry for double post,

 

On the pics, we can see how we used the command with :

 

  • Items
  • OnChange

Then the 3rd pic shows us how our excel is represented.

 

Best regards.

Super User
Super User

Re: Adding a radio control in a gallery

@Matt68 

The problem is that you are only having the logic in the for Patching your Excel "Etat" column to true.  You don't seem to have any logic that will associate the actual record value with what should be the value of the Radio control.

The fact that you see it at first is because you are on that screen, whatever you click on will patch the Excel to true.  It doesn't even appear that there is logic to distinguish the true or the false - just to do true.

 

So, with a Radio control, you need to have values on each item that can associate with something.  Your current Items are a 3 row table of nothing...so there is nothing to associate with.

My suggestion would be that you set the Items property to some value you can use. 

Let's go with the Items property of : [0;1;-1]

We will associate 0 with false, 1 with true and -1 with no state.

My guess is you don't want the labels to appear since you have a header for the radio controls - so, set the color of the radio control to White.  The circles will remain, but the labels will blend with the background.

In the Default property put this formula:  If(IsBlank(Etat); -1; Etat="True"; 1; 0)

This will set the default to -1 it is is blank, 1 if it is true and 0 otherwise.

Then, in your OnChange action, change the formula to this:

Patch(Tableau1; ThisItem; 
{Etat : Switch('3 radios_2'.Selected.Value;
0; false;
1; true;
-1; "")
}
)

This should give you what you are looking for both saving and displaying.

 

I hope it is helpful for you.

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Matt68
Level: Powered On

Re: Adding a radio control in a gallery

Hey @RandyHayes 

 

Thank you for your help, it's amazing cause that's working finally !

 

But now I work on a database, what database do you recommended me ?

 

Cause I used my application, I feel a little latencie. I work in database in Excel, maybe i would to use a other application ? Sharepoint ? SQL ? Acces ?

 

Best regards.

Super User
Super User

Re: Adding a radio control in a gallery

@Matt68 

If you're going to migrate off of Excel, your next step up would be SharePoint.  After that, SQL.  

Access plays no part of anything, so don't consider that.

Most all will have some latency issues, Excel will be the worse.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 19 members 4,265 guests
Please welcome our newest community members: