Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Condition for 'contains' does not run when the value is null



I'm making a room booking flow which looks at the calendar for the meeting room to see if there is already a booking at the time being requested. The room can be split into two so it needs to account for a booking existing in the calendar for 'GFMR 1', 'GFMR 2', or 'GFMR 1+2'.  GFMR stands for Ground Floor Meeting Room.


To do this I want it to check if there's an event containing 'GFMR' in the subject, if there isn't it creates an event with the subject 'GFMR 1', if there is it checks if the subject contains '2', if it doesn't it creates an event with the subject 'GFMR 2'.


I've got everything working except when there isn't a calendar event with 'GFMR' in the subject (which obviously isn't ideal). In this case the flow runs but never does the conditional step to check if it contains GFMR. I assumed that the conditional would still run and since no value does not contain 'GFMR' then it would have the outcome of 'No'. Instead it just doesn't run it. Can anyone help with this please?



Dual Super User
Dual Super User

Re: Condition for 'contains' does not run when the value is null

Hey @Oxford_Josh 


When checking for an attribute to check if there is some data, it depends on the datatype. 


1. If the datatype is array, you can use the length function to check if it is 0 and if it is 0 then it is empty. 


For string, you can use the coalesce function. Something like this: 

coalesce('string1', 'string2')


In the place of string1, you can have the attribute from dynamic selector and in the place of string 2 have a test sample string. this function will return the first non null value among the two strings provided. 


Hope this Helps!

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!

Community Support Team
Community Support Team

Re: Condition for 'contains' does not run when the value is null

Hi @Oxford_Josh ,


Have your problem been solved?  If yes, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!


Best Regards,



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

Helpful resources


Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!


New & Improved Power Automate Community Cookbook

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


Power Automate Community User Group Member Badge

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


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,534)