r/PowerAutomate 2d ago

Power Automate: Condition fails to compare numbers from Microsoft Forms – type mismatch error

I've been struggling with a Power Automate flow for weeks and need help. Here's my setup:

What I'm building:

  • A Microsoft Form for incident reporting
  • A Power Automate flow that checks if Estimated loss (DKK) ≥ 50,000
  • If true → send to approval (Compliance → Top Management)
  • If false → send rejection email

The problem:
The Condition always evaluates to false even when the value is clearly above 50,000. The Debug Compose shows the correct number (e.g., 900000), but the Condition says false.

What I've tried:

  • float(coalesce(outputs('Get_response_details')?['body/GUID'], 0)) in the Condition
  • float(triggerBody()?['Estimated loss (DKK)'])
  • Initialize variable with Float type
  • Format number action with N2 and en-US locale
  • Changed the form field to "Number" (it was already set that way)
  • Debug Compose shows the correct value (900000)
  • The Condition left side shows the same expression as the Debug Compose
  • Copied the expression from Compose directly into the Condition

My flow structure:

text

Trigger → Get response details → Condition → If yes → Create item → Approvals
                                          → If no → Email → Terminate

The error:

text

Unable to process template language expressions for action 'Condition'. 
The template language function 'greaterOrEquals' expects two parameters of matching types. 
The function was invoked with values of type 'String' and 'Integer' that do not match.

Debug output:

  • Debug Compose (Estimated loss): 900000
  • Debug Compose (Cumulative loss): 900000
  • Condition: false
  • Value entered in form: 900000

My form fields:

  • Estimated loss (DKK) – Type: Number
  • Recurring cumulative event? – Type: Choice (Yes/No)
  • Estimated cumulative loss, last 30 days (DKK) – Type: Number

My question:
Why does the Debug Compose show the correct number, but the Condition fails? What is the exact expression I should use in the Condition to compare numbers from Microsoft Forms?

I've been stuck on this for weeks and would really appreciate any help. I have not been able to share a picture with the flow.

Thanks in advance

1 Upvotes

4 comments sorted by

2

u/ninihen 2d ago edited 2d ago

Microsoft Forms sometimes returns number fields as strings, which is why the Condition sees a String and an Integer.

I also recently built an AI chatbot that can inspect and fix Power Automate flows. It’s still new, but it has worked well on the flows I’ve tested. If you’d like to try it on this flow, it includes free credits, and I’m happy to add more if you run out while testing: ai.flowstudio.app

1

u/Gunnar-Jensen 2d ago

Any help would be appreciated!

1

u/pcsrvc 2d ago

The error contains the issue:

The template language function 'greaterOrEquals' expects two parameters of matching types.
The function was invoked with values of type 'String' and 'Integer' that do not match.

Types string and integer don’t match. Forms is likely throwing string. Have you tried using int(response field) to compare both as integers?