web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / only edit form instead...
Power Apps
Unanswered

only edit form instead of having to entries in the list + prefilling form based on selection of gallery item!

(0) ShareShare
ReportReport
Posted on by 90

Hello,

I have a SharePoint list where some of the columns are filled in through a form on Screen1. On Screen2, I have a view form that displays the data of a specific item from a gallery which has been connected to the list. I have another form in Screen2 which is set to edit mode.

 

The edit form in Screen2 has a ‘colors’ drop-down list that gets the rest of the form to be automatically filled based on the selection of the drop-down list. I would like the edit form to be automatically filled based on the product selected in the gallery. Also, I want to make sure that when the edit form is submitted, the item picked from the gallery is only edited. 

At the moment, when I choose an item from the gallery, the view form gets filled but the edit form doesn’t. In addition, when I submit the edit form, a new item is created in the SharePoint list instead of editing the existing one. 

Note: I’m planning to add a filter to the gallery to only display items of a specific category based on the selection of another  drop-down list which has been filled in the form in Screen1. I thought about getting  the edit form to be filled automatically by making the selection from ‘colors’ drop-down list to be automatically made based on the each filter type.

 

Could this be achieved?

Categories:
  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    @Rag23 

     

    Hi, I am going to answer INLINE 


    @Rag23 wrote:

    Hello,

    I have a SharePoint list where some of the columns are filled in through a form on Screen1. On Screen2, I have a view form that displays the data of a specific item from a gallery which has been connected to the list. I have another form in Screen2 which is set to edit mode.

     

    The edit form in Screen2 has a ‘colors’ drop-down list that gets the rest of the form to be automatically filled based on the selection of the drop-down list.

    [Michael] Remove it or remove the code that is in the OnChange or OnSelect or whereever you have code (maybe the Item Property of the Gallery looks at this drop downs value, I dunno but remove it whereever it is)

     

    I would like the edit form to be automatically filled based on the product selected in the gallery. Also, I want to make sure that when the edit form is submitted, the item picked from the gallery is only edited. 

     

    At the moment, when I choose an item from the gallery, the view form gets filled but the edit form doesn’t.

    [Michael] Hi, there is no difference between filling a form from a Gallery, when the form is in View mode versus Edit mode. So you just have to set the DataSource to the same as the Gallery and them set the Item property to GalleryControlName.Selected

     

    In addition, when I submit the edit form, a new item is created in the SharePoint list instead of editing the existing one. 
    [Michael] Can you verify you are in Edit mode, instead of New mode in the Form? The default is Edit but it depends if you changed it.

     

    Also if you ever do NewForm(FormName) it will be in New Mode, so maybe you are doing that. If you want to reset an Edit form use ResetForm(FormName).

     

    Also, for it to DO an edit, the data has to actually map to a row in the table. For instance, if you fill the Form with data, but when it goes to get submitted, it has no way to tell the actual record to update, it will always create a new one. Once you bind it to the Datasource of the Gallery and the .Selected, you should be fine.

     

    My guess is, however you are filling it, it has no idea how to match it or you are doing NewForm on it

     

     

    Note: I’m planning to add a filter to the gallery to only display items of a specific category based on the selection of another  drop-down list which has been filled in the form in Screen1. I thought about getting  the edit form to be filled automatically by making the selection from ‘colors’ drop-down list to be automatically made based on the each filter type.

     

    [Michael] Please no. Use the Gallery.Selected so that its properly initialized and pointing to the correct record.

     

    Could this be achieved?


    As I have answered everything, I am happy to still answer questions, but if you are good with these, can you please Mark it as Resolved (as the answer) and possibly a ThumbsUp, then feel free if you have additional questions after the above.


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Rag23 Profile Picture
    90 on at

    Thanks for your reply Michael. I really appreciate it!

    For the this: 

    [Michael] Remove it or remove the code that is in the OnChange or OnSelect or whereever you have code (maybe the Item Property of the Gallery looks at this drop downs value, I dunno but remove it whereever it is)

     

    I’m not sure where to remove it since I have used switch in the default property of every element in the form to be able to fill the field based on the selection of the drop-down list.

     

    Also, the form is in edit mode 🙂

     

    i have tried the GalleryControlName.Selected 

    on the item property of the form but it isn’t working. I’m assuming that the data sources haven’t been bound yet as you mentioned.

     

    Sorry if there has been any misunderstanding from my side.

     

    THANKS once again !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard