cancel
Showing results for 
Search instead for 
Did you mean: 

Exit formula on condition

Please add an escape expression for formula's like the exit sub command in VBA.

 

Example:

If(true
 ,do something (1)
,do something (2)
 ; exit/stop formula
)
;do something (3)
;do something (4)

do something (3)/(4) should not run when the if statement is true. If false the exit/stop should end formula.

 

This addition will ensure that multiple repetition of formulas are no longer needed , because you can exit the formula before code runs.

Status: New
Comments
GeorgeWinters
Advocate I

Yes an exit() function would make 'Less Code'

KroonOfficeSol
Resident Rockstar

@Audrie-MSFT , been more then two years with no reaction off the PowerApps team on this idea. Is a kind of formula escape formula already on the roadmap as far as you know? Hope to hear from you.

TickboxPhil
Advocate IV

Really need this, call it Quit() or Return() as Exit() already exists to quit out of whole app. One example:

 

if(<some validation fails>, Notify("Please check X data!"); Quit())

<otherwise carry on with refreshes, variable setting, processing, etc>

 

This saves the load of pointless embedded ifs from bloating the "low code" premise.