# How do I validate typed inputs before comparing them in a Power Automate condition?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Extend Microsoft Power Platform (35–40%)
Updated: 2026-11-25T06:47:26.018221+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-flow-typed-inputs-and-expressions.html

## Also asked as

- How can I keep text, numbers, and Booleans from being mixed up in a cloud flow?
- How do I check input types and expression context in Power Automate?

Define the input contract and validate data before evaluating a Power Automate condition. Distinguish a Boolean from the string `"true"`, a number from numeric text, and a single object from an array. Decide separately how to handle omitted, null, and empty values. If a quantity must be an integer, reject invalid values in an earlier branch before calling a numeric comparison.

For example, after validating the schema of an array, an expression within its loop can test whether the current item is ready and has high priority:

```text
and(equals(item()?['ready'], true), greater(item()?['priority'], 2))
```

Here `item()` refers to the current loop item. A trigger condition must instead refer to the relevant trigger payload. Use the syntax expected by your editor, including the leading `@` in a trigger condition. Compare raw Dataverse Choice values against the expected raw values. Inspect the action inputs and outputs to confirm the actual property names and types.

In a development flow, try a valid item, a missing value, numeric text, and a Boolean-looking string. Confirm that validation rejects the wrong shapes before any write and that the intended items reach the business branch.

**Microsoft references**

* [Use expressions in conditions in Power Automate - Power Automate](https://learn.microsoft.com/en-us/power-automate/use-expressions-in-conditions)
* [Reference for functions in workflow expressions - Azure Logic Apps](https://learn.microsoft.com/en-us/azure/logic-apps/expression-functions-reference)

Source: [AB-400: Reliable Cloud Flows and Copilot Studio Workflows](https://learningpathx.com/news/ab-400-reliable-cloud-flows-and-copilot-studio-workflows.html)
