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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery list entries d...
Power Apps
Answered

Gallery list entries disappearing

(0) ShareShare
ReportReport
Posted on by

I am currently building an app that allows an HR member add comments ont employee profiles.

 

Disclaimer: I am heavily new to PowerApps

 

The HR employee is greeted with a gallery list of all the employees who are under them. The HR person can click on the employee number on his row and access a detail page with a field that allows them to add comment. Each time a comment is added, a new row is added

example

uniqueIDEmployeeIDHR Notes
1234101comment 1
1235101comment 2

 

However, my gallery list seems to behave strangely. If I add an entry using the app, a second row with the same employeeID appears (which is what I want for testing purposes). However, if I close the app and open it again, I only see the first row. The second one is not there. When looking into the excel source file, the new rows with the comments are there.

 

What I want is to be able to sort this list and have multiple rows for the same employee in display.

 

Here is the code for the gallery list

 

GroupBy(
 Filter(
 Sort(
 Excel_Table;
 uniqueID;
 Ascending
 );
 HRManagerID= HRID
 );
 "EmployeeID";
 "uniqueID";
 "Data"
)

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,508 Most Valuable Professional on at

    Hi @Fnaud ,

    If you have access to SharePoint, I suggest you change to this rather than Excel - it will always be problematic with large record number changes.

  • Fnaud Profile Picture
    on at

    Hi Warren,

     

    thank you very much with the solution! I ended up building a test excel document with hand-written data to test out and it worked. I think the problem was my original excel file. It seems like 3000 rows is maybe too much for the file. When opening back the excel file after it has been connected with powerapps, a new column "__PowerAppsId__" appears.

     

    I then added the column "employeeid" from my original file which added 3000 new rows. This caused the new file to cease functioning with my app because I am not able to preview the file anymore in a simple table in the app. 

     

    Do you any idea what would cause this to happen?

  • Verified answer
    WarrenBelz Profile Picture
    153,508 Most Valuable Professional on at

    Hi @Fnaud ,

    After reading your last post again, you may need this

    AddColumns(
     GroupBy(
     YourTableName,
     "employeeID",
     "managerID",
     "Data"
     ),
     "Comments",
     Concat(
     Data,
     comment & ", "
     )
    )
     

     

    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.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    153,508 Most Valuable Professional on at

    Hi @Fnaud ,

    That is exactly what I posted - you need a nested gallery in the main gallery with code as described except the Text of the label would be

    ThisItem.Comment

    Another option is to have a flexible height gallery with  this in the label

    Concat(
     ThisItem.Data,
     Comment & Char(10)
    )

    and it would list the comments in it with a new line for each one. If you set the AutoHeight on this to true, the gallery will expand when required.

     

    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.

    Visit my blog Practical Power Apps

     

     

  • Fnaud Profile Picture
    on at

    Sorry Warren if I am not clear. I did some changes and let me try to explain it better.

     

    I have an excel source file with rows that are each representing a record entry about an employee with comments about him

    example:

    rowIDemployeeIDmanagerIDcomment 
    12311110001

    comment #1

     
    12411110001comment #2 

     

    the main page of the app is a gallery of employees that are attached to the managerID. It looks something like this

     

    123
    124
    125
    126

    There is a button on each row that leads to a "detail page" for each employee which has more infos about the employee, including a gallery list of the comments (from the "comment" column in the excel source) that are linked to the employee. The problem is that right now the gallery list only shows the comment from the first entry in the excel file.

     

    I hope this explanation of my situation can help you understand better the situation

  • WarrenBelz Profile Picture
    153,508 Most Valuable Professional on at

    @Fnaud ,

    I am still not totally clear what you want here, but assuming you want to see all notes for an employee, you can GroupBy employee in a Gallery, but would then need a nested gallery displaying the notes - it would have the Items

    ThisItem.Data

    and then a Label in this with

    ThisItem.Notes

     

    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.

    Visit my blog Practical Power Apps

  • Fnaud Profile Picture
    on at

    Hi Warren, sorry for the long delay. I was out sick.

     

    My raw data is currently an excel file with rows each having informations for an entry linked to an employee. If an hr employee leaves a new note on a employee, a second row will be added for the same employee. My problem is that I am unable to have a list of all the notes related to an employee on it's "details page". It only shows the first entry added but not the new ones.

  • WarrenBelz Profile Picture
    153,508 Most Valuable Professional on at

    Hi @Fnaud ,

    I am a bit unclear here - what does the "raw" data look like and what do you want to see as your displayed result ?

  • Fnaud Profile Picture
    on at

    I have tried removing completely the "group by" function which leaves my gallery with the following statement

    Filter(
     Sort(
     EXCEL_SOURCE;
     EmployeeID;
     Ascending
     );
     ManagerId = IDTxtBox
    )

     

    But it still gives me one entry per employeeID. Would that be a better fix to create a "details page" for each employee and have a list of the recent comments left by the manager? 

  • Fnaud Profile Picture
    on at

    Yes I did this grouping hoping it would show the different entries per employeeID. What I would like to see is 2 lines with the same employeeID but both having different comments related to them. Removing "UniqueID" from the grouping method does not fix the problem.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 427

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 336 Super User 2025 Season 2

Last 30 days Overall leaderboard