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 retriev...
Power Apps
Answered

Collection not retrieving data from SharePoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Good day all

 

I am having an annoying issue with a PowerApp.  I have basic SharePoint list with a column called Topic (Choice with a number of choices available for selection).  The collection in the app should collect all the topics and then display them without duplicates - I am building an FAQ accordion so the topics will each contain a number of question so topics should only display once.

 

I have the following formula set on the App OnStart property:

ClearCollect(colTopics,RenameColumns(Distinct(FAQs,Topic),"Result","Topic"));Set(glbTotalTopics,CountRows(colTopics))

 

 

When I check Collections to check if it is working, I see the following:

colTopics.png

 

so the results header is correctly adjusted to Topic as per the formula but I do not understand why I am not getting any results - there are a total of 4 distinct Topics in the list. 

 

Any help on this would be greatly appreciated! This is from the FAQ accordion solution Jamie Willis-Rose presented at Global Con 4 so if anyone has reproduced that successfully and can share how they got this part working, it would be great to know.

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @Anonymous ,

    Try this (it worked for me)

    Set(
     gblTotalTopics,
     CountRows(
     Distinct(
     FAQs,
     Topic
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey WarrenBelz

     

    Thanks for the reply.  When I opened the app this morning to try the solution, it was working.  So it seems that I just should have waited a few hours instead of rebuilding the app 7 times!  Is it odd to have to wait for a function like this to start working?  I will test your solution in another app later to check if it works better.

     

    Thanks again!

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Thanks @Anonymous ,

    It should work - it is simply a more compact version that uses a lot less system overhead than making a collection and then dissecting that.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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