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 from fields ...
Power Apps
Unanswered

Copy data from fields to new item

(0) ShareShare
ReportReport
Posted on by 415

Hello,

 

Is there a way to:

 

1) Select an existing record

2) Click a button and the OnSelect property would copy the data from the fields on the record into a new record with the ability to change the client name and submit the new form?

 

I'm creating an app that personal trainers will use to track group client workouts.  Each client that participates in the group workout will have a separate client profile where their records will reside.

Categories:
  • trishmalloy Profile Picture
    415 on at

    Or, is there a way to create a record, add multiple client names to the record and have each client's record reside under their own profile?

  • eka24 Profile Picture
    20,925 on at
    Do you want to repeat a record then after that make some changes to the new record?
    If that's the case let me know
  • trishmalloy Profile Picture
    415 on at

    Yes, copy all field values from selected record.  The only field that will change is the Client Name field.

  • eka24 Profile Picture
    20,925 on at
    Please follow this:
    1.Have a Form1 and Gallery1
    Items property of the Form1 : Gallery1.Selected

    2. Insert an Icon1 or button1 into Gallery1
    Set the Onselect of the Icon1 to; Set(CollectionName,ThisItem) . This will create a collection of the item clicked

    3. Insert a another button2 on your screen not in the gallery and put the onselect to the following Patch:
    Patch('[dbo].[DataSource]',Defaults('[dbo].[ DataSource]'),
    {FirstName: CollectionName. FirstName,
    ReceipientName: CollectionName.ReceipientName,
    FullName: CollectionName.FullName,
    EntryDate: CollectionName.EntryDate})

    Note; Point 2 above would create the collection1 while point 3 would insert the created items in the collection into your dataSource

    Kindly change the datasource and column names to yours.

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
  • trishmalloy Profile Picture
    415 on at

    I'll give this a try.  I'm using a SP list, what do I specify for "CollectionName", the list name?

  • eka24 Profile Picture
    20,925 on at
    CollectionName Is any name you prefer to give to the collection. It is a temporary copy of the record
  • trishmalloy Profile Picture
    415 on at

    Got an error message, see attachment.  Can you let me know how to fix this?

    ERROR.PNG
  • eka24 Profile Picture
    20,925 on at

    Use this:
    Select (Parent);Set(CollectionName,ThisItem)
    I assume the icon is inside the gallery
  • trishmalloy Profile Picture
    415 on at

    Getting closer.  This will be awesome to have in place and working!  See attachment.

    Error3.png
  • eka24 Profile Picture
    20,925 on at
    Remove the first ) After clients workout.
    Also refer to My Patch line by line looking for various parentheses

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard