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 / copy or duplicate the ...
Power Apps
Answered

copy or duplicate the value to other text input

(0) ShareShare
ReportReport
Posted on by 418

Hi,

 

Just to get an idea and logic.. how do i copy/duplicate the invoice value to payment value using collection? So that, if user keyin the invoice value, the payment value will follow exact from invoice value. But for payment value can be change by user before save to collection.

twister_0-1613793375187.png

 

Thanks

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @twister ,

    I am assuming these are in cards in a form?

    On the OnChange on the Invoice Amount Text Box, put

    UpdateContext({varAmount:Value(Self.Text)});
    Reset(YourPaymentAmountTextBoxName)

    Make the Default of the Payment Amount Text Box

    If(
     varAmount>0,
     varAmount,
     Parent.Default
    )

    If these are not on a form, you can just make it varAmount and you will not need the Reset

    Lastly on the end of your Save code 

    UpdateContext({varAmount:0});

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • twister Profile Picture
    418 on at

    actually im using textinput in gallery with repeating table with collection.. is the formula are same?

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @twister 

    Not quite - you can leave off the Parent.Default and would need ThisItem.FieldName if the control is bound to a field in the gallery data source.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • twister Profile Picture
    418 on at

    looks like almost working.. but only 1 more issue i detect..if i keyin new record for invoice payment, the value save in will also change.. how to cater this?

    twister_2-1613898879522.png

     

    in collection already in place..

    twister_1-1613898851903.png

     

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @twister ,

    That is why you need to reset varAmount on your save code as noted earlier.

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • twister Profile Picture
    418 on at

    perfectly.. now its working as expected.,.. thanks @WarrenBelz 

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @twister 

    Please remember to click Accept as solution if my post helped you solve your issue. This will help others find it more readily and also closes the item. 

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 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard