cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ca2020
Helper I
Helper I

If statement invalid

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',")
3 REPLIES 3
annajhaveri
Community Champion
Community Champion

@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','')
Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
srduval
Super User
Super User

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
Helper I
Helper I

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

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,207)