cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
trishmalloy
Post Partisan
Post Partisan

Copy data from fields to new item

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.

29 REPLIES 29
trishmalloy
Post Partisan
Post Partisan

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?

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

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

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."

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

CollectionName Is any name you prefer to give to the collection. It is a temporary copy of the record

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


Use this:
Select (Parent);Set(CollectionName,ThisItem)
I assume the icon is inside the gallery

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,955)