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 / Equivalent of return w...
Power Apps
Unanswered

Equivalent of return with negative if

(0) ShareShare
ReportReport
Posted on by 44

I need to check a condition and stop execution if that condition is met. 
I found this as example :
Solved: How to control formula execution in powerapps? - Power Platform Community (microsoft.com)

 

 

If(
 YourNegativeCondition,
 Notify("YourNotification",NotificationType.Error),
 CarryOnWithWhatever . . .
)

 

Not sure to have understand it, because i can use only a statement in the If condition per branch. 
So the CarryonWithWhatever must be a single instruction. How can i achieve that if i neet to insert multple function in the CarryOnWithWhatever?

 

Eg of my CarryOnWithWhatever :

 

SubmitForm(Form1);;
If(IsBlank(Form1.Error);Reset(myControl1));;
If(IsBlank(Form1.Error);Reset(myControl2))

 


I would avoid to set a localContext boolean and then proceed with many if line one for each instruciton

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Simone_01 ,

     

    If I understand correctly you want to execute multiple formulas in the context of an If function.

     

    For that you can use chaining, in your case that's the ';;" operator:

    SubmitForm(Form1);;
    
    If(
     IsBlank(Form1.Error);
     Reset(myControl1);;
     Reset(myControl2)
    );;
    

    With the above, after Form1 has been submitted without errors, both myControl1 and myControl2 will be reset.

  • Simone_01 Profile Picture
    44 on at

    So basically i have missunderstood and it's actually possible to put more than one instruciton per branch of the if condition, using ';;' instead of ';'

    Thanks a lot

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Simone_01 ,

     

    Indeed this is possible.

     

    A thing to note that, depending on your language settings the operators are different:

     

    If you use a comma ',' to separate arguments in a function call, the operator use for chaining is a single semicolon ';'.

     

    However if you use a single semicolon ';' to separate arguments, as is the case with you, the operator to use for chaining is a double semicolon ';;'.

     

    More info on this can be found here: Operators and Identifiers in Microsoft Power Fx - Power Platform | Microsoft Learn

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard