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 / Patch Value on Gallery
Power Apps
Answered

Patch Value on Gallery

(0) ShareShare
ReportReport
Posted on by 176

how to calculate
PVU * QTY

and save the PVT value in the list.

 

Patch(('Devis détail');ThisItem;{PVT: {ThisItem.PVU*ThisItem.Qty}})
 
a1.png
a3.png
a2.png
Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ben-00-38 

    Your formula needs to be on a behavior action of a control.  It almost looks like in your image that it is on a label text property.

     

    But, if in a behavioral action, then your formula needs to be:

       Patch('Devis detail'; ThisItem; {PVT: ThisItem.PVU * ThisItem.Qty})

     

    I hope this is helpful for you.

  • Ben-00-38 Profile Picture
    176 on at

    Is it possible to adapt the code with the control below
    calculation and recording of PVT.


    so that PVT is sent during the action on the arrow.

     

    a4.png

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ben-00-38 

    Yes, change the formula to the following:

    UpdateIf('Devis détail; ID=ThisItem.ID; {Qty: ThisItem.Qty + 1})
  • Ben-00-38 Profile Picture
    176 on at

    with
    UpdateIf ('Detailed quote'; ID = ThisItem.ID; {Qty: ThisItem.Qty + 1})
    PVT is not calculated.
    by clicking on the arrow left or right I need pvt to be calculated and sent to the list.


    the code works but I have not succeeded in adapting yours

    With (
    {
    _itm: LookUp (
    'Detailed quote';
    ID = Gallery7_1.Selected.ID
    )
    };
    Patch (
    'Detailed quote';
    _itm;
    {Qty: _itm.Qty + 1};
    {PVT: (ThisItem.Qty + 1) * ThisItem.PVU}
    )
    )

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard