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 Apps / Collection not populat...
Power Apps
Answered

Collection not populating Option Sets from Dataverse

(0) ShareShare
ReportReport
Posted on by 1,088

I have a basic ClearCollect(allReports, Reports) on start.

When I run on start and look at what is gathered, it gathers all the fields I need except the Option Set ones?

If I just use the table and pull into a gallery it pulls in all fields and option sets.

How can I get the Collection to also pull those in?

 

Thanks,

Terry

Categories:
  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Mattw112IG 

     

    Option sets are a type of complex data type that store both a numeric value and a text label for each option. When you use ClearCollect to collect data from a Dataverse table, it only collects the simple data types, such as text, number, date, etc. It does not collect the complex data types, such as option sets, lookups, images, etc.

     

    To collect the option set fields, you need to use the AsType function to convert them to simple data types.

    For example, if you have an option set field called ProductGroup in your Reports table, you can use this formula:

     

    ClearCollect(allReports, ShowColumns(Reports, "ProductGroup".AsType()))

     

    You can also collect multiple fields at once by using commas to separate them in the ShowColumns function.

    ClearCollect(
     allReports, 
     ShowColumns(
     Reports, 
     "Name", 
     "Date", 
     "ProductGroup".AsType()
     )
    )

     

     If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard