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

Community site session details

Session Id : tcPp/W5aL4HeOBHkNIwuX2
Power Apps - Building Power Apps
Unanswered

Create a table from Clearcollect

Like (1) ShareShare
ReportReport
Posted on 2 Jul 2024 12:03:24 by 30

I am trying to create a table that shows the number of jobs and statuses of each job is assigned to each person and put it in a table.

 

My database name is 'CAS Requests' which is a SharePoint list.

My Columns I want to capture are:

"Assigned" people or group

"Status" Choices (New, Processing,Complete)

"Title" text (project name)

Refresh button

 

:The idea is to have a table that shows 

Employee

New

Processing

Complete

Bob1056

   

 

Can anyone help

  • binkie Profile Picture
    30 on 08 Jul 2024 at 23:01:46
    Re: Create a table from Clearcollect

    Anyone?

  • binkie Profile Picture
    30 on 03 Jul 2024 at 02:29:10
    Re: Create a table from Clearcollect

    Thanks for the fast reply I had a go  but I am getting an error. 

    I took a screenshot of the Canvas and the collection I am getting from the data.

     

    Not sure where to go from here or what am I doing really...?


    canvasview.pngColCASRequests.png

  • Rahman1005 Profile Picture
    109 on 02 Jul 2024 at 13:31:23
    Re: Create a table from Clearcollect

    Hi,

    Please use below code Onselect property of button.

    ClearCollect(
    colCASRequests,
    'CAS Requests'
    );

    ClearCollect(
    colGroupedCASRequests,
    AddColumns(
    GroupBy(
    colCASRequests,
    "Assigned",
    "GroupData"
    ),
    "NewCount",
    CountIf(GroupData, Status = "New"),
    "ProcessingCount",
    CountIf(GroupData, Status = "Processing"),
    "CompleteCount",
    CountIf(GroupData, Status = "Complete")
    )
    );

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on 02 Jul 2024 at 12:07:23
    Re: Create a table from Clearcollect

    hi @binkie ,

    Add the following code to the OnSelect property of the Refresh button to create a collection that groups and counts the job statuses for each employee:

     

    ClearCollect(
     colCASRequests,
     'CAS Requests'
    );
    
    ClearCollect(
     colGroupedCASRequests,
     AddColumns(
     GroupBy(
     colCASRequests,
     "Assigned",
     "GroupData"
     ),
     "NewCount",
     CountIf(GroupData, Status = "New"),
     "ProcessingCount",
     CountIf(GroupData, Status = "Processing"),
     "CompleteCount",
     CountIf(GroupData, Status = "Complete")
     )
    );

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete