Courseiva
Demonstrate the capabilities of Power AutomatehardMultiple ChoiceObjective-mapped

Power Automate Condition Expression Data Type Mismatch: How to Fix

Exhibit

{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "actions": {
      "Condition": {
        "type": "If",
        "expression": "@greater(triggerBody()?['score'], 0.8)",
        "actions": {
          "Send_approval_email": {
            "type": "ApiConnection",
            "inputs": {
              "host": {
                "connectionName": "shared_office365",
                "operationId": "SendEmail"
              },
              "parameters": {
                "to": "manager@contoso.com",
                "subject": "High score alert",
                "body": "Score is high."
              }
            },
            "runAfter": {}
          }
        },
        "else": {
          "actions": {
            "Log_to_SharePoint": {
              "type": "ApiConnection",
              "inputs": {
                "host": {
                  "connectionName": "shared_sharepointonline",
                  "operationId": "CreateItem"
                },
                "parameters": {
                  "dataset": "https://contoso.sharepoint.com/sites/Logs",
                  "table": "ScoreLog",
                  "item": {
                    "Score": "@triggerBody()?['score']"
                  }
                }
              },
              "runAfter": {}
            }
          }
        },
        "runAfter": {}
      }
    },
    "triggers": {
      "manual": {
        "type": "Request",
        "kind": "Http",
        "inputs": {
          "schema": {
            "type": "object",
            "properties": {
              "score": {
                "type": "number"
              }
            },
            "required": ["score"]
          }
        }
      }
    }
  }
}

Refer to the exhibit. A Power Automate flow definition is shown. The flow is triggered by an HTTP request with a 'score' property. When the score is greater than 0.8, it sends an approval email to the manager. Otherwise, it logs the score to a SharePoint list. The flow runs but when a score of 0.9 is submitted, no email is sent and the SharePoint log is created. What is the most likely cause?

Quick Answer

The answer is that the 'score' value is passed as a string instead of a number. This is the most likely cause because the Power Automate condition expression uses the 'greater' function to compare the trigger body's 'score' property against the numeric value 0.8, but when the HTTP request sends the score as a string like '0.9', the comparison fails due to a data type mismatch—string comparison evaluates character by character rather than numerically. On the Microsoft Power Platform Fundamentals PL-900 exam, this scenario tests your understanding of how Power Automate handles data types in condition expressions, a common trap where JSON payloads from HTTP requests often default to strings. To avoid this, remember that functions like 'greater', 'less', and 'equals' require matching data types; a string '0.9' is not greater than 0.8 because '0' is compared to '0', then '.' to '.', and finally '9' to '8', which actually passes alphabetically, but the logic breaks in other cases. Memory tip: "Strings stick together, numbers compare—always check your trigger's data type before the condition."

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The 'score' value is passed as a string instead of a number.

If the 'score' property is passed as a string (e.g., '0.9') instead of a number, the comparison 'greater(triggerBody()?['score'], 0.8)' will compare a string to a number, which will not work as intended. Power Automate's 'greater' function requires both arguments to be numbers; a string comparison will not evaluate correctly, causing the condition to evaluate to false, thus the approval email is not sent and the flow proceeds to the default action (log to SharePoint). Option A is incorrect because 'greater' is the correct function name in Power Automate; 'greaterThan' is not a valid function. Option C is also incorrect because the function 'greater' is spelled correctly; the issue is data type, not spelling. Option D is incorrect because the trigger is explicitly described as an HTTP request in the stem, not 'When a file is created'.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The condition uses 'greater' but should use 'greaterThan'.

    Why it's wrong here

    Incorrect. The function name 'greater' is correct; 'greaterThan' is not a valid function in Power Automate.

  • The 'score' value is passed as a string instead of a number.

    Why this is correct

    Correct. If the 'score' value is passed as a string, the 'greater' function compares a string to a number, causing the condition to evaluate to false.

  • The condition expression is misspelled as 'greater' instead of 'greaterThan'.

    Why it's wrong here

    Incorrect. The function is spelled correctly; the issue is that the score is a string, not a number.

  • The trigger is set to 'When a file is created' but the request is HTTP.

    Why it's wrong here

    Incorrect. The trigger is an HTTP request, not 'When a file is created', as described in the stem.

About these practice questions

This PL-900 question is part of Courseiva's 904-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on PL-900

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Refer to the exhibit. The Power Automate flow definition includes a manual trigger expecting employeeId and amount. If an expense amount is $6,000, what will happen?

hard
  • A.The flow will send an approval email to the employee.
  • B.The flow will start an approval assigned to manager@contoso.com.
  • C.The flow will fail because employeeId is missing.
  • D.The flow will send an email to manager@contoso.com.

Why B: The condition checks if amount > 5000; since $6,000 is greater, the 'Yes' branch runs, which starts an approval assigned to manager@contoso.com. Option A is wrong because the approval is sent to the manager, not the employee. Option C is wrong because employeeId is provided in the trigger and the condition does not depend on it. Option D is wrong because the flow sends an approval request (via Start an Approval), not just an email.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PL-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-900 exam.