Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to use number from MS Forms in a Power Automate condition

Posted on November 7, 2021November 7, 2021 by Tom

“I’d like to send different notification for good and bad rating via MS Forms form, but my Power Automate condition to check the number doesn’t work.

“The template language function ‘greater’ expects two parameter of matching types. The function was invoked with values of type ‘String’ and ‘Integer’ that do not match.


If you use Microsoft Forms to collect feedback, you might collect also some kind of rating. It can be a star rating, number rating, or just a text field to type in a number. The flow can then behave differently depending on this rating. It can send a notification if there’s a bad rating for immediate feedback, or reply with a ‘thank you’ message for a good one. It could also store the response in a SharePoint list to keep track of the bad reviews. But no matter what the flow does, you must always use a ‘Condition’ to evaluate the rating. And that’s where you might encounter a problem if you use the ‘less’ or ‘greater’ condition.

Power Automate Forms number condition

Convert the values

As the error message will tell you, you’re trying to compare a string with an integer. A text with a number. The ‘Condition’ needs both of the sides with the same type. You need either 2 strings or 2 integers, but you can’t combine them (the exception being ‘is equal to’ condition).

As it must be 2 strings or 2 integers, you’ve got two options how to change the type. You can use the string(…) or int(…) expression to change the left or the right side of the condition, e.g.

int(Rating) <operator> number
or
Rating <operator> string(number)

Warning: don’t try to convert the number to string using single quotes, e.g. ‘3’. Such condition won’t work properly.

Summary

All the information Power Automate will extract from MS Forms will be provided as a string, and as such it won’t work in a condition with a number. Such condition will end with an error, unless you convert one of the sides to the right format. And it’s up to you if you want to convert the left or the right side (but the right side is easier).


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes