cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoeO
Level: Powered On

Condition based on Json body value

Hi,

 

Is the "if yes" and "if no" of a flow condition based on true/false results? Im trying to create a simple condition based on a value of an item from a json body. If the value does not equal "null" (True), then proceed to "If Yes", if it does equal "Null" (Flase) then proceed to "If No". It seems to correctly identify the value and returns "True" as needed, but it doesnt use "if no" when the results is false. As you can see below, if the results is not "True", then the "If yes" step fails as expected.

 

Im using the following condition:

@not(equals(body('Parse_Liv_Users_Json')?['filters']?['test1']?['item1'],'null'))

 

Condition1.pngCheck if value is null, for example, the value commentConditionTrue.pngOn this record it does not eq Null (True)ConditionFlase.pngOn this record it is null (False)

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Condition based on Json body value

 

Hi @ JoeO,

 

Could you please share a full screenshot of the configuration of your flow?

 

 

The flow run failed because an error occurs at "Apply to each2", and the flow has run into the "If yes" branch of the "Condition", so the result of the "Condition" is true in your flow, if the result of the "Condition" is fause in your flow, the flow would run into the "If no" branch of the "Condition".

 

Please check the expression in the Condition to see if the result of the "Condition" is true in your flow.

Or please share share a full screenshot of the configuration of your flow and a full configuration of the array "Parse_Liv_Users_Json" that you mentioned.

 

Please share more details so we could try to help you.

 

Regards,
Alice Zhang

JoeO
Level: Powered On

Re: Condition based on Json body value

Hi Alice, see requested screenshots below. In this condition, im trying to check whether the "comments" value is not null. The condition results should be false if it's null. 

 

 

 

 

Parse Liv_User Output.pngCondition Config.pngCondition Flow Results.png

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

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!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (6,046)