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 / ClearCollect is not re...
Power Apps
Answered

ClearCollect is not rendering values

(0) ShareShare
ReportReport
Posted on by 228

I have the following code that should be rendering results but it doesn't:

 

ClearCollect(CollectMyRequests,{Value:"All"});Collect(CollectMyRequests,Distinct('ListName',Status.Value))

 

My "Status" column is a Sharepoint Choice column and contains the choices "To Be Started" "In Progress" and "Completed"

 

Any help would be appreciated. I've tried changing Value to Result and still no luck.

 

Thanks in advance.

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,064 Most Valuable Professional on at

    Hi @ShondaT ,

    This should work

    ClearCollect(
     CollectMyRequests,
     {Result: "All"},
     Distinct(
     AddColumns(
     ListName,
     "StatValue",
     Status.Value
     ),
     StatValue
     ).Result
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • ShondaT Profile Picture
    228 on at

    That did it!

    I hate to expand this because the additional thing I'm trying to do is have the list by default display requests where all of the user's requests appear when they land on the screen. I have a Requestor field that is a people and group sharepoint field from Active Directory.

     

    Thank you so much! I am so curious to know why the code I had didn't work since I got it from watching one of Shane's videos from Powerapp911. I'm trying to grasp the whole concept of Collect and Clearcollect and how those work with various field types. 

     

    Thank you so much for helping me get this far WarrenBelz! If you have any thoughts on the above I'd really appreciate the help.

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

    Hi @ShondaT ,

    Your main issue was you had Value in the "All" part instead of Result. You can actually do without the collection and put this directly into the Items

    Ungroup(
     Table(
     {
     Menu: 
     Table({Result: "All"})
     },
     {
     Menu: 
     Distinct(
     AddColumns(
     ListName,
     "StatValue",
     Status.Value
     ),
     StatValue
     ).Result
     }
     ),
     "Menu"
    )

    Your additional question would require a filter based on the user's name or email, depending what you have in your list.

  • ShondaT Profile Picture
    228 on at

    Ok. I'll have to figure out the filter thing. Thank you again!

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard