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 / Pulling my hair out! G...
Power Apps
Unanswered

Pulling my hair out! Get SharePoint Columns corresponding to a collection & sorting on choice!

(0) ShareShare
ReportReport
Posted on by 2

Using the OOTB Direct Report function - collection:  myDirectReports
I have a sharepoint list that has 1 to 5 items corresponding to each employee in the company. I'm only concerned with the latest record per employee (using built in SharePoint ID)

So I have a gallery - that should list all my direct reports along with information from the latest record from the SharePoint list corresponding to that direct report/person. Additionally - I'd like to be able to sort by a choice field from that SharePoint record.

Here's what I have so far

 

ClearCollect(myTeamStatus, SortByColumns(
AddColumns(
 If(
 Header_2.SubMenuClicked = "Direct Reports",
 myDirectReports,
 myTeam
 ),
 "currentStatus",
 SortByColumns(
 Filter(
 EmerCheckIn_CurrentStatus,
 Title = Mail
 ),
 "ID",
 Descending
 )
))

 


This produces a list of my direct reports with an additional column called 'currentStatus' - which ends up being a table (not ideal)

Now I think I can add 3 columns using the add column + filter option for each of my columns I want but my thought process was this would be a no - go because it would produce too many calls to SharePoint (ie: slow). 




Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @teekayzee 
    Rather than using ADDCOLUMNS is there any opportunity to create a new column in the the datasource as single-line text and write the most recent status to that column each-time an update occurs?  Then you would not have any performance issues 🙂

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • teekayzee Profile Picture
    2 on at

    I assume using Flow?  I'm not sure that's an option.

    The SP List is a list of all of the status reports the user has submitted (the latest one via the SharePoint ID being the most current) - I'd like for the managers to use PowerApps and be able to view the most recent status update/report for all their direct reports. 

    So in my head, Power Apps would get a list of all the direct reports , create a dynamic OR filter for all of them and pass that to SharePoint - then create some columns based on the lastest sharepoint item pulled back.

    The direct reports collection would look like (scaled down for obvious reasons):

     

    EmployeeName, Id, mobilePhone, currentReportStatus, currentReportText, currentReportCreatedDate

     

     

  • mdevaney Profile Picture
    29,993 Moderator on at

    @teekayzee 
    Actually, using Power Apps: not Flow.


    I assume all data is input through a Power Apps form.  Each time the form is submitted update/patch the new Status to the appropriate column.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "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