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

How to update a single value?

Hi

 

I've been messing arround with PowerApps, and I just don't get how it works. This is what I'm current;y trying to do.

 

I have a list of people. Each people has a few values, like Name, email, etc. And there is a value called NumberOfStrikes, which is a number.

 

In the details view of the person, I placed a button with the "+" sign next to the NumberOfStrikes vlaue. I want NumberOfStrikes to increase by one every time I press the button (and ideally, to save the update right away to the Data Source). So far I can't beguin to figure out how to do this.

 

I can't even change the text of the button when I press it. I tried using a formula on the OnSelect:

 

ButtonAdd.Text = "New Text"

 

I tried:

 

UpdateContext({Text:"New Text"})

 

But nothing I do has any result.

 

Any help would be apreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to update a single value?

Hi @JosePerez,

 

If here you are working with the Detail screen, then the formula under the OnSelect property of the '+' Sign should be:

 

UpdateContext({Input:Value(BrowseGallery1.Selected.NumberOfStrikes)+1});Patch(PeopleList,BrowseGallery1.Selected,{NumberOfStrikes:Value(Input)})

 

See if it would work in your scenario,

and if you have any further questions, please post back.

 

Regards,

Michael

 

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: How to update a single value?

Hi @JosePerez,

 

If here you are working with the Detail screen, then the formula under the OnSelect property of the '+' Sign should be:

 

UpdateContext({Input:Value(BrowseGallery1.Selected.NumberOfStrikes)+1});Patch(PeopleList,BrowseGallery1.Selected,{NumberOfStrikes:Value(Input)})

 

See if it would work in your scenario,

and if you have any further questions, please post back.

 

Regards,

Michael

 

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (4,993)