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

how to decrease field value

Hello,

i have a table and the field value for example is 5. how can i decrease the value by 1 or do decrement using button in powerapps ? 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: how to decrease field value

Hi @AdhamFH 

 

In a case where you have a table to store data, you can use the below expression on the "OnSelect" property of the button control to decrease the value:

Patch(TableName, LookUp(TableName, Col1 = "Value1"),{NumCol: Value(LookUp(TableName, Col1 = "Value1").NumCol) -1})

Here, LookUp(TableName, Col1 = "Value1") is used to identify the record for update. You need to replace the names used in this expression with the actual name of the controls/arguments.

If you can share more details about the configuration, we might help you build the expressions.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
Super User
Super User

Re: how to decrease field value

Dual Super User
Dual Super User

Re: how to decrease field value

Hi @AdhamFH 

 

In a case where you have a table to store data, you can use the below expression on the "OnSelect" property of the button control to decrease the value:

Patch(TableName, LookUp(TableName, Col1 = "Value1"),{NumCol: Value(LookUp(TableName, Col1 = "Value1").NumCol) -1})

Here, LookUp(TableName, Col1 = "Value1") is used to identify the record for update. You need to replace the names used in this expression with the actual name of the controls/arguments.

If you can share more details about the configuration, we might help you build the expressions.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

AdhamFH
Level: Powered On

Re: how to decrease field value

Thank you  @timl for your response, but i think it's a bit different

AdhamFH
Level: Powered On

Re: how to decrease field value

Thank you @yashag2255 for your response, it helps me a lot

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 (6,665)