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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,238)