web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Select action that onl...
Power Automate
Answered

Select action that only outputs columns in the source with values

(0) ShareShare
ReportReport
Posted on by 870 Super User 2026 Season 1
Hello,
 
I have a business user who created a multi question/condition MS Form, in which, depending on the answers, goes down different paths. Only certain fields are filled in each time.  When the form is submitted, I'd like to build a record of just the values that have been filled in. The empty columns can be ignored. Do I do this with a Select action and expressions? Or is there another way?
 
 
 
 
Thanks for any guidance!
Categories:
I have the same question (0)
  • Verified answer
    Sunil Kumar Pashikanti Profile Picture
    1,353 Moderator on at
     
    Select + expressions is the correct and supported pattern, but it must be combined with a filter step.
     
    Important limitation:
    The Select action by itself cannot conditionally remove properties. It always outputs all mapped keys, even when values are empty.

    Recommended Pattern
    1. Convert the form response into a key‑value object
    2. Convert that object into an array
    3. Filter out empty values
    4. Rebuild a clean object containing only populated fields (Optional)
    This pattern:
    Works reliably for branching MS Forms
    Scales well as questions change
    Avoids dozens of Conditions or hard‑coded branches
    Produces a clean, reusable output
     
    Step 1:
    Map each question name to its response:
    {
      "End Date": outputs('Get_response_details')?['body/EndDate'],
      "Seafood": outputs('Get_response_details')?['body/Seafood'],
      "Perishable or Total": outputs('Get_response_details')?['body/Perishable']
    }

    Sept 2:
    Convert object to array
         union(body('Compose'), body('Compose'))
     
    Step 3:
    Filter out empty values
         not(empty(item()?['Value']))
     
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.
  • Cgangweg01 Profile Picture
    870 Super User 2026 Season 1 on at
    Thank you!
    So, step two basically creates a record in the array of each field in the response whether it has a value or not. Then filter the empty out.  Is that it?
  • Sunil Kumar Pashikanti Profile Picture
    1,353 Moderator on at
     
    Yes. Step 2 converts the response object into individual key‑value records (including empty ones). Step 3 filters out the empty values, leaving only the fields that were actually answered.
  • Chriddle Profile Picture
    8,672 Super User 2026 Season 1 on at
    The function union() cannot convert an object into an array.
     
    Try this instead:
     
    xpath(
    	xml(
    		addProperty(
    			json('{}'),
    			'Root',
    			outputs('Compose')
    		)
    	),
    	'/Root/*[. != ""]'
    )
    json(item())

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard