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 / Run time : patch funct...
Power Apps
Answered

Run time : patch function error

(0) ShareShare
ReportReport
Posted on by 264

Hello everyone,

 

I have this function on select 

p_doc_0-1645097837011.png

 

it works well, but after run time, I get this error :

p_doc_1-1645097865631.png

 

I believe it is patch function, does anyone how how to rest a variable

Any help is appreciated.

 

 

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    What is varFormMode?

    In the second part you need to put an item

     

    Like this (to create a new item):

    Patch(

    Datasource,

    Defaults(Datasource),

    FormUpdates

    )

     

    Like this (to edit an item):

    Patch(

    Datasource,

    LookUp(Datasource, ID = ThisItem.ID),

    FormUpdates

    )

     

    Check the patch function:

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

     

    But if you are using a form you could use SubmitForm() and you should have that Notification and Navigate on Proeprty OnSucess

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Verified answer
    PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @PaulMatha when using a Form you do not need to use the patch function.

     

    So replace your patch function with SubmitForm(DetailsForms)

     

    And in addition. Place all formulas after your current patch statement in the OnSuccess Property of the Form.

     

    OnSuccess will be triggered if the Submit was really successfull. 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard