cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Resolver II
Resolver II

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

Super User III
Super User III

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

yes copy an item and repeat it

I already did that any idea what is the issue

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

set collection gives error  and the copy patch formula the same

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.

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})

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (42,881)