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

Notifications

Announcements

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 257

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 😉

Categories:
I have the same question (0)
  • Verified answer
    JoaoSantos489 Profile Picture
    257 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard