Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Edit Screen / Create Screen Gallery

Dear All, 


I'm struggling with a problem of create and edit records based on a gallery item.

Let me try to explain.


1.  I've created an overview screen with a gallery and a button to add a new record outside the gallery.  (attachment Capture1.png)

2. On the add button, I want to open an edit screen to create a new record.  So on the OnSelect, I have put the following statement : Navigate('EditCreate Screen',ScreenTransition.None)

3.  This opens a data entry screen with two text input controls where i can enter data and save it to a collection that will be shown in the gallery i've mentioned in step 1. (attachment Capture2.png)
     OnSelect of the save button, I've added the following code : Collect(
        WorkDescription: TxtCountDrives_1.Text,
        BudgetNo: txtBudgetNo_1.Text
    'Overview Screen',

4.  This will add a record in the gallery as expected (attachment Capture3.png)
5.  The next step i want to achieve is that when someone presses the pencil, the record is shown in the 'EditCreate Screen', so the user has the possibility to change the data and update the collection.  


PS I'm not using data forms.


I'm not achieving to create a solution form step 5 and to get the difference to populate the fields with the value from a record of the collection and to show a blank screen when the screen is opened from the Add button.


I hope someone can help me.


Kind regards







Super User
Super User

Hi @Desmedts 


Well done, app is looking very good so far.


What is the formula that you have tried on the pencil icon? What part of the pencil icon isn't working?

You should be able to use something like below:

Navigate('EditCreate Screen',ScreenTransition.None)


You would then have to set the default formula for the text input controls to be:

If(Form_Edit, homeGallery.Selected.Fieldname, "")


To save the record back to the collection:

Patch(colOverview,homeGallery.Selected,{WorkDescription: TxtCountDrives_1.Text,BudgetNo: txtBudgetNo_1.Text});
Navigate('Overview Screen',None)


A form could also help quite a bit here, they can make your live easier in some instances.


Please let me know if you don't come right.


Dawid van Heerden
Follow on Twitter: @davestechtips
Subscribe to YouTube:
**If you found this reply helpful, please like it and mark this as the answer to close the topic and make it easier to find for other people with similar questions. AND we get points for it 😉

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,641)