cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bdc604
Advocate III
Advocate III

Condition: if string is equal to null not working

I have an empty string initialized, followed by a condition; if string is equal to null.

 

Problem: the logic is following the wrong path, should be the yes side. What am I doing wrong?

I tried rebuilding in case the flow corrupted or something, same results.

 

04.PNG03.PNG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @bdc604 ,

 

If you do not set the initial value when initializing String variable, you do not need to configure the parameters on the right when configuring Condition.

 

Image reference:

51.PNG

Flow run history:

52.PNG

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
efialttes
Super User
Super User

@bdc604 

Have you tried with coalesce() function as a workaround?

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#c...

equals(coalesce(variables('xStringR'),'MyVariableIsNull'),'MyVariableIsNull')

 

It can also helps you to doublecheck if your variable is null from service logic point of view

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-bacao-msft
Community Support
Community Support

Hi @bdc604 ,

 

If you do not set the initial value when initializing String variable, you do not need to configure the parameters on the right when configuring Condition.

 

Image reference:

51.PNG

Flow run history:

52.PNG

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you!

I left the value empty, and it's okay.image.png

 
 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,971)