Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

If Statement is considered Invalid



I have this if statement that I'm like 99% sure it's written correctly, but power automate keeps saying it's invalid. 




The code is above, I'm using this format for multiple variables since it's for an approval route. Basically with this piece, I'm trying to use it in an email body to list who hasn't approved the file yet. So I'm want it to display name if the variable to check whether the field is blank is false (field does not have to be filled out) and to also break line or start a new line with each name. 


I know that I can enter and do this myself, but I didn't want to have awkward gaps between names since not every field will be filled out. I have 20 different approval requests, but they will never all be filled out at the same time, but to make my life easier I want to make it so I don't have to do anything and it'll show the names with nice formatting through expressions. 


This worked in a different test, but now it doesn't. 


I'm also using basically the same format to display the email of the person approving, which works fine. 



Can someone verify that I wrote it correctly? 




Accepted Solutions

I think you might have a missing open bracket after the question mark - ?['Hardware....


try that and keep us posted.





View solution in original post


I think you might have a missing open bracket after the question mark - ?['Hardware....


try that and keep us posted.







Thank you for pointing that out! It was the missing piece. Sometimes it's so hard to catch those little mistakes. 



Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,795)