cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
trikli
New Member

Power Automate Condition / String Comparison not working

I have a MS Form that collects information and creates a task in Planner. It's very simple.

 

The challenge I have is this. On the Form, I have a Drop Down List with the names of the possible Planner projects that the task could be inserted into. 

 

I then have a flow setup to trigger when the form is submitted, which it does. 

The flow lists and loops through all the possible Planner projects and compares the Project Name with the value from the form. Even though the text from the form is an EXACT match from the name of the Planner project, it always returns "false". I did a Compose so I could see what it was doing and the text is an exact match, yet it still fails. Based on other posts, I tried putting the values into variables and the comparison still fails. 

trikli_1-1627333983541.png

 

Any ideas would be much appreciated!

 

 



1 ACCEPTED SOLUTION

Accepted Solutions
trikli
New Member

I solved it, I will post here in case someone else encounters this issue. Essentially, the "space" character I was getting from the MS Form was not the same character as the "space" in the name of the Planner Plan. So, the strings didn't match even though to the naked eye, they did. 

 

I solved it by doing doing a compose with the string I get back from the MS form. I copied the "space" and then pasted that into a replace() expression and replaced it with ' '. It seems stupid, but it worked.

View solution in original post

5 REPLIES 5
trikli
New Member

I have more information. I copy and pasted the values into Excel and did a comparison, since I'm better with Excel. It failed there to, which got me wondering. I tried deleting the spaces between the words and re-added a space. That worked, so apparently there is HTML or something in the text I get from the form. How do I address that before I compare the two strings?

trikli
New Member

I solved it, I will post here in case someone else encounters this issue. Essentially, the "space" character I was getting from the MS Form was not the same character as the "space" in the name of the Planner Plan. So, the strings didn't match even though to the naked eye, they did. 

 

I solved it by doing doing a compose with the string I get back from the MS form. I copied the "space" and then pasted that into a replace() expression and replaced it with ' '. It seems stupid, but it worked.

View solution in original post

Hi @trikli 

Glad that your issue is solved. And thanks for your posting here and sharing the solution in the forum as it would be helpful to anyone who encounters similar issues.

Best Regards.

@trikli 

I'm glad that you got it worked out.  Did you try using the trim() expression?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Yeah, I had tried that too. It was an odd one for sure. What was interesting is it didn't match in Excel either, so there was some sort of non-printable character as the space. In Excel I could do a replace on the char(), but not in Power Automate, so that made it a little tricky. Anyway, I appreciate the response.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,176)