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

function: equals null or is null

In the below function in flow, how do I get the first part of the if statement to basically say, if the result is blank do this...

 

if(
substring(body('Html_to_text'), 0, indexOf(body('Html_to_text'), '---+---')) = null, 
body('Html_to_text'),
substring(body('Html_to_text'), 0, indexOf(body('Html_to_text'), '---+---'))) 

 

When I add the = null it errors out - "The expression is invalid"

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: function: equals null or is null

Hi @TesDA 

 

if(equals(substring(body('Html_to_text'), 0, indexOf(body('Html_to_text'), '---+---')),null),body('Html_to_text'),substring(body('Html_to_text'), 0, indexOf(body('Html_to_text'), '---+---')))

Can you try this expression? (please check the brackets. I might have missed something there)

 

Basically you have to wrap the condition for '=' in the equals() function. 

 

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!

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: function: equals null or is null

Hi @TesDA 

 

if(equals(substring(body('Html_to_text'), 0, indexOf(body('Html_to_text'), '---+---')),null),body('Html_to_text'),substring(body('Html_to_text'), 0, indexOf(body('Html_to_text'), '---+---')))

Can you try this expression? (please check the brackets. I might have missed something there)

 

Basically you have to wrap the condition for '=' in the equals() function. 

 

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!

View solution in original post

TesDA
Level: Powered On

Re: function: equals null or is null

Worked perfectly! Thank you!

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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

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,401)