web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Need help making a cos...
Power Apps
Answered

Need help making a cost estimator

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I want to when i press a button "Add" (Lägg till) it will add the value in the box to the left (7) to a value which will then be presented in the text input on the top (Summa [TEXT INPUT] kr). How do i do this? I will add more products to the list which will then also be added in the same way. But what code on the button do i need to put in?

Untitled-3.gif

 

Also I will need a button to reset the value. Is this possible?

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    You can use a variable that represents the default value of that text input, which you can initialize to 0 (such as on the screen's OnVisible property) - and you can also use a button to set that value back to zero, resetting the value.

    Screen.OnVisible: UpdateContext({ value: 0 })
    SummaTextInput.Default: value
    ResetButton.OnSelect: UpdateContext({ value: 0 })

    On the list of items, I'm assuming you have them in a gallery. If the value (in krona) is represented by the column 'Value', then you can have this formula in the Lägg till button:

    LaggTillButton.OnSelect: UpdateContext({ value: value + ThisItem.Value })

    That will update the 'value' variable, and its value will be reflected on the text input.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    I will look into this. thanks alot.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard