web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

If statement invalid

(0) ShareShare
ReportReport
Posted on by 26

Hi I am getting a this statement is invalid return from this function. I simply want it to return an X in my initialize variable step if the dynamic content field from my sharepoint item matches a word, in this case housing. What am i doing incorrectly? Thanks

if(equals(triggerOutputs()?['body/Stressor1'],'Housing'),'X',")
Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @ca2020  you have a incorrect quote in the end, you have put the double quote, but it should be two single quotes, use below expression

    if(equals(triggerOutputs()?['body/Stressor1'],'Housing'),'X','')
  • srduval Profile Picture
    1,760 Moderator on at

    after inputting your expression toggle back and forth between expression and dynamic content. Especially if you copy and pasted the expression. If you still have problems, try doing it in a compose action and then pass the compose value as the variable value. 

  • ca2020 Profile Picture
    26 on at

    OK I managed to do it by inserting formula with blanks and then adding text after. Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 291 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 109 Super User 2026 Season 1

Last 30 days Overall leaderboard