cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

How to determine if a string variable is blank?

How is this accomplished? Now that the advanced editor is missing from Conditions, I don't know how to check to see if a string is empty!

Previously I'd do something like @{empty(variables('varName'))} in the condition. 

image.png

3 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: How to determine if a string variable is blank?

you can use null in a express on the right side

 

or

 

use length(var) on the left is greater than 0.

View solution in original post

Super User
Super User

Re: How to determine if a string variable is blank?

Hi @ericonline 

 

Did you tried using the length expression?

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Dual Super User
Dual Super User

Re: How to determine if a string variable is blank?

Hi @ericonline 

 

You can still use the old expression @{empty(variables('varName'))}

 

just this time becuase its being used in a  condition

 

Capture.PNG

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

4 REPLIES 4
Super User
Super User

Re: How to determine if a string variable is blank?

you can use null in a express on the right side

 

or

 

use length(var) on the left is greater than 0.

View solution in original post

Super User
Super User

Re: How to determine if a string variable is blank?

Hi @ericonline 

 

Did you tried using the length expression?

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Dual Super User
Dual Super User

Re: How to determine if a string variable is blank?

Hi @ericonline 

 

You can still use the old expression @{empty(variables('varName'))}

 

just this time becuase its being used in a  condition

 

Capture.PNG

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

Super User
Super User

Re: How to determine if a string variable is blank?

I've tried @RezaDorrani 's solution and it worked. I'll mark all three of your suggestions as a solution as I'm sure they also work.

Thank you very much!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (9,105)