Forum Discussion
Power Automate/MS Forms - Checking for blank responses
Yes, you can handle blank responses efficiently in Power Automate without creating 50 individual condition blocks. Instead, use a single expression or simple logic per field, often within a "Compose" action or directly in the Word document population step.
Here’s how you can streamline it:
Option 1: Use coalesce() to Set Default for Empty Answers
The coalesce() function returns the first non-null value from a list of arguments. You can use this to set "Intentionally unanswered" as the fallback for any blank input.
Example Expression:
For each response field:
coalesce(body('Get_response_details')?['yourQuestionID'], 'Intentionally unanswered')
You can use this inside:
A "Compose" action (to reuse the result later)
A "Populate a Microsoft Word template" action (for dynamic Word fields)
Option 2: Inline Expression in Populate Word Template
If you're using the "Populate a Microsoft Word template" connector, use expressions directly in the input fields.
Example:
if(empty(body('Get_response_details')?['yourQuestionID']), 'Intentionally unanswered', body('Get_response_details')?['yourQuestionID'])
This checks if the response is empty and injects the placeholder text if so.
Tip for Managing Many Fields
Since you're dealing with 50 questions, consider using:
Variables or Compose Actions with dynamic naming
A consistent naming convention like q1_response, q2_response etc.
Reusing a formula like above for each without wrapping in Condition blocks
You can even create a helper flow that builds a dictionary of question/response pairs with defaults and then merges that into your Word template.