cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

How to creat copy from exisiting item?

I need to create a "copy item" on a typical auto-generated three-form data source (list, detail, edit forms) connected to a SP list.

1) User has selected a certain item, and is now on the DetailForm.

NewForm(Form2); FormMode.Edit=FormMode.New; Navigate(Edit, ScreenTransition.None)​

but actually it is not coping the item it is just give me a new blank form . 

33 REPLIES 33
Highlighted
Resolver II
Resolver II

Re: How to creat copy from exisiting item?

@gme-eg  In Details screen for Data Source Property provide your sharepoint list and in Item property <GalleryName>.Selected.

Eg: In your app you have a Gallery with name "GalleryA" which shows list of items from your sharepoint list. then in your details screen Item property should be GalleryA.Selected which shows selected item.

Highlighted
Community Champion
Community Champion

Re: How to creat copy from exisiting item?

is it that you want repeat a record in your list?
Highlighted
Helper III
Helper III

Re: How to creat copy from exisiting item?

yes copy an item and repeat it

Highlighted
Helper III
Helper III

Re: How to creat copy from exisiting item?

I already did that any idea what is the issue

Highlighted
Community Champion
Community Champion

Re: How to creat copy from exisiting item?

Please follow this:

  1. Have a Form1 and Gallery1
  2. Items property of the Form1 : Gallery1.Selected
  3. Insert and Icon1 or button1 into Gallery1
  4. Set the Onselect of the Icon1 to; Set(CollectionName,ThisItem) . this will create a collection of the item cliked
  5. Insert a another button2 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 4 above would create the collection1 while point 5 would insert the created items in the collection into your dataSource

 

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

Highlighted
Helper III
Helper III

Re: How to creat copy from exisiting item?

set collection gives error  and the copy patch formula the same

Highlighted
Community Champion
Community Champion

Re: How to creat copy from exisiting item?

Change the onselect of the icon1 to:
Select (Parent);Set(CollectionName,ThisItem)
If it doesn't work, give Error message.
It works at my end.
Highlighted
Helper III
Helper III

Re: How to creat copy from exisiting item?

sorry not working

Select(Parent);Set(Copy,Gallery3.Selected)

 

also for the patch added to the button

Patch('[dbo].[Working Hours Tracker Application]',Defaults('[dbo].[ Working Hours Tracker Application]'),
{Employee: Copy. Employee,
Service Category: Copy.Service Categor,
Customer: Copy.Customer})
Highlighted
Community Champion
Community Champion

Re: How to creat copy from exisiting item?

Please check the formula Select(Parent);Set(Copy,ThisItem) not
Select(Parent);Set(Copy,Gallery3.Selected)

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,307)