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 / Creating a collection ...
Power Apps
Answered

Creating a collection from a SQL view

(0) ShareShare
ReportReport
Posted on by 16

Hi
I am trying to create a collection from a SQL view. Is this possible

So far I have tried 

ClearCollect(colQC13List,'[GFX_Sales].[DC_QC13_DataView]');

With the explicit column selection setting turn off as per https://powerusers.microsoft.com/t5/Expressions-and-Formulas/ClearCollect-and-Filter-working-in-weba... View solution in original post 
I have also tried putting a unique row number in the SQL view

and finally I tried the the 

ShowColumns() method

 

So far nothing is working

 

I am aware I could had build the collection with various lookup and add columns method but the view cross four SQL tables, so it would be a bit of a pain....

Could some let me know if I can set up a collection from a SQL in powerapps (It would seem a sensible thing to want to do)

If the answer is no, what have other done as a work around

Thanks

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    37,285 Super User 2026 Season 2 on at

    @coder57 

    Yes, this is possible. In my example here, vw_DistinctCities is a SQL Server view.

    timl_0-1618440374496.png

     

    This formula collects the view as expected.

    timl_1-1618440406235.png

     

    What is it that doesn't work for you? Is it that colQC13List doesn't contain any data, or you seeing an error message?

    As a first step, I would try removing the view from Power Apps and re-adding it. If that doesn't work, I would run Monitor and check that Power Apps is making the call to SQL Server.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard