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 / Update form rather tha...
Power Apps
Answered

Update form rather than great new item when editing the item created in gallery

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I have an app where it allows you to check/edit the details of a current item within Sharepoint: 

 

Screenshot 2022-10-14 at 10.30.43 AM.png

 

However this takes you back to the form with the details but once I submit again this shows a new item in the gallery/Sharepoint where as when I edit I want to update the item. 

 

Screenshot 2022-10-14 at 10.31.24 AM.png

 

I also want to keep the ability to create new items too!

 

Any ideas? 

 

Categories:
  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @AB21, Edit Form Control has three modes: Edit, New and View. In your use case, you need to use the Edit and New Mode. On the Screen that you have shared, check the OnVisible property of the screen and see what mode is set for the form. 

    • To only Update records, Form must be on Edit Mode and the Item Property of the Form is set to your Gellery.Selected.
    • To create new records, the Form must be in New Mode.
    • Form should have the correct Data Source. 
    • No need to use the patch formula if you are using the right mode. Just use SubmitForm(FormName) function.
     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

  • AB21 Profile Picture
    on at

    Hi @AhmedSalih 

     

    Thanks for this, I want to be able to submit on this page: ( Repair log form)

     

    Screenshot 2022-10-14 at 10.31.24 AM.png

     

    But edit the current item/update the record on this page: (Repair log details)

     

    Screenshot 2022-10-14 at 11.23.36 AM.png

     

     

    Both pages have no OnVisible property

    What do I need to do in my situation? 

  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @AB21 

     

    If you want to use Patch to perform modifications instead of adding features, you need to use the formula in the item property of the form instead of defaults('Repair log') in the second parameter of the Patch function.

    But as @AhmedSalih  said, you don't really need to use the Patch function. 

    You just need to use the SubmitForm function on the Onselect property setting of the submit icon.

    EditForm, NewForm, SubmitForm, ResetForm, and ViewForm functions in Power Apps - Power Platform | Microsoft Learn

     

    Best Regards,

    Levi

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard