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 / How to several stateme...
Power Apps
Answered

How to several statements in the same function

(0) ShareShare
ReportReport
Posted on by 259

Hi Guys,

In my PowerApps app I have a button that patch all the data to my table. So far so good.

The thing is that in that same button I want to refresh all the fields too but I get the 'Expected Operator error' (image bellow)

 

What I am missing.

Thanks 😉

TESTE.PNG
Categories:
  • Verified answer
    JoaoSantos489 Profile Picture
    259 on at

    Got it guys!
    Use ';; ' in the ')'

    Like this:  );;

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey!! 

    Your patch function is wrong. It should be like this to create new item:

     

    Patch(

    DataSource;

    Defaults(DataSource);

    {

    ...

    }

    );;

    Reset(...);;

     

    To edit a item:

     

    Patch(

    DataSource;

    LookUp(DataSource, CONDITION);

    {

    ...

    }

    );;

    Reset(...);;

     

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

     

    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!

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard