Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

multiple expressions and variable condition in Canvas App

I have a chain of expressions on a button click event where I keep updating the context variable errorMsg and at the end check to see if the variable is empty(IsEmpty/IsBlank) to do one thing or do another. For some reason it always appears to be finding variable errorMsg to be empty. I am assuming that this is probably due to this being evaluated before the previous expressions are executed. Is this understanding correct ? And how do I overcome this.

Super User III
Super User III

Please can you show your expression.
Check out difference in IsEmpty/Isblank


If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution

Here is a snippet of the expression that I use

If(IsBlank(DataCardValue2.Selected.Value),Concatenate(varErrorMsg,"Error: 1"),Concatenate(varErrorMsg,""))
If(!IsBlank(DataCardValue12)&&IsBlank(DataCardValue15),Concatenate(varErrorMsg,Char(13),"Error: 2."),Concatenate(varErrorMsg,""))
If(DateDiff(DateTimeValue(Text([@ModelDrivenFormIntegration].Item.'End Date',DateTimeFormat.ShortDate) ),(DataCardValue12.SelectedDate))>0,Concatenate(varErrorMsg,Char(13),"Error: 3."),Concatenate(varErrorMsg,""))
If ((IsEmpty(varErrorMsg)) ,
Navigate(SCR_1) ,


Note: IsEmpty/IsBlank have both been tried by me.

Hi @bravoperss ,

Can you please use Format Text on this code and post in a box (</> icon at end of first row above) and I will have a look at it for you.


Thanks for the reply. The above now appears to be working for me. I am not sure what resolved it if it was an issue with the expression or clearing of variables, but it now works fine.


Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,270)