Introduction
In this article, I will be representing to copy of the items in PowerApps. I have tried to provide the scenario with solutions in the below steps.
Scenario
It is an interesting requirement to copy items by requester or user, which saves their time for duplicate entries. In this post, we'll look at how to copy items with a confirmation message and how to open the copied item directly in the form.
Objective
I've employed a common gallery with two icons, one of which will open the item in the form to view/edit the details, and there is another icon to copy the item. When copy is clicked, a popup message will appear to confirm if the user really wants to copy. If the user says yes, the item will be copied, and another popup will appear confirming if they would like to open the item in edit form. If the user clicks yes, the item will open in edit form. If the user selects cancel on either of the two popups, the user will be navigated back to the gallery. When a user does not want to open the item in the edit form, the copied item will appear as the first item in the gallery (if the gallery is sorted in descending order).
Here is my gallery with a copy icon to perform the specific action. Kindly refer to my article to create a request/save the item in the list and open the item from the gallery to edit the form. In this gallery, Only the creator can copy their own item. So, on visible property, a formula is written that validates if a logged user is also the creator of the item.

Since we are creating two pop up we shall be creating two groups. Let us see each group one by one. We shall be using variables to hide and show Pop Up.
Step 1. Create a First or Confirmation pop-up to copy the item/request
Important: The sequence of the controls in the group should be as shown in the image below, even if the controls are added randomly. Use the bring front menu and bring in the order shown in the image below. I shall work, organize, and work on UI for each control individually and then group them all together.
So, here I am aligning the Background rectangle(RectCopyConfirmation), which covers the entire screen as faded so that background actions are deactivated. Since all other controls have been added and renamed already, all the controls are visible on top of the background gray-out rectangle(RectCopyConfirmation).

Same way in the below picture, you can also see the Popup rectangle(RectCopyConfirmSmall) is also pulled and brought to the middle of the screen. Height and width are set for smaller rectangles (RectCopyConfirmSmall) too.

After aligning both the buttons and label, change the text of the label. Subtitle2 is the control where ID is getting stored. Subtitle 2 is the control inside the gallery.

Change the label text color to white so that it is better in its visibility.











Join the conversation! Your thoughts help the community grow.