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 data entered in o...
Power Apps
Answered

copy data entered in one row of gallery to another rows of gallery

(0) ShareShare
ReportReport
Posted on by 158

Hi All,

 

I have a requirement in which gallery has 10 fixed row. These rows have ID- 1to 10. gallery consist of text inputs, dropdown and combobox. There will one copy icon and paste icon in each row. So if user has entered any value in any row example in 5th row then he can click on copy icon of that row and can click on paste icon of anyother. So that copied data will only be pasted in that selected row. 

Items of gallery-

ridhan_0-1703055527321.png

gallery pic-

ridhan_1-1703055696098.png

 

Categories:
  • Verified answer
    scalca Profile Picture
    on at

    basically you need something to store the copied values and update the selected record in the collection, therefore you're collection must have all the columns too in order to keep those values.
    for example if I have a gallery with one textinput and one dropdown I would initialize it like this

    ClearCollect(ItemsCollection, {ID: 1, Text: "", Choice: {Value:""}}, {ID: 2,Text: "", Choice:{Value:""}},{ID: 3,Text: "", Choice: {Value:""}},{ID: 4,Text: "", Choice: {Value:""}})

    value property of textinput control: ThisItem.Text

    DefaultSelectedItems property of dropdown control: ThisItem.Choice

     

    the onselect of the copy icon is going to store the current values in a variable like this

    Set(varCopied, {Text: TextInputCanvas1.Value, Choice: DropdownCanvas3.Selected})

     

    finally the onselect of my paste icon would patch varCopied values to corresponding record in my collection like:

    Patch(ItemsCollection, LookUp(ItemsCollection, ID = ThisItem.ID) , {Text: varCopied.Text, Choice: varCopied.Choice})

    here it's also possible to use UpdateIf function without using the lookup

     

    hope this helps

     

  • Jonathan Manrique Profile Picture
    2,695 on at

    Hi @ridhan 

     

    In your paste button you must make a patch to your gallery to which you want to copy, making a mapping between the data

     

    Patch(table, default(),{item:galleryselect.name})

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution

  • ridhan Profile Picture
    158 on at

    Hi @scalca - It works for me. Thanks for your help.

     

    Regadrs!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard