cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Manilyn0509
Helper III
Helper III

How to show one employee name only if it has duplicates in sharepoint list

As shown below Manilyn and Maeson are being used six (6) times because there are six (6) types of Leave.  I used Gallery ThisItem.Employee.DisplayName it also simply show six (6) times per employee name  as it was in the sharepoint list. But is it possible to show just one name per employee in powerapps ? All I want id to make it an Employee list and show its balance leave details as I click their names. 

 

Sharepoint List:

zz.png

 

I just want it to be like this. 

yy.png

 

 

7 REPLIES 7
WarrenBelz
Super User
Super User

@Manilyn0509 ,

Not quite your format (you cannot do this), but this should get you the information required

AddColumns(
   GroupBy(
      'Balance Leave Masterlist',
      "Employee",
      "LeaveType",
      "Data"
   ),
   "LeaveNo",
   CountRows(Data),
   "AllowedCreditLeave",
   Sum(Data,Allowable),
   "UsedLeave",
   Sum(Data,Used),
   "LeaveBalance",
   Sum(Data,TotalBalance)
)

 

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

To which property should I put this code on?

@Manilyn0509 ,

The Items of the gallery you mentioned.

 

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
Super User
Super User

Hi @Manilyn0509 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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

Hi, @WarrenBelz , 

Seems like it's not working on person/group and choice column. Is there's any way? Thanks for helping . 

AddColumns.png

 

@Manilyn0509 ,

Correct - you cannot GroupBy complex field types

AddColumns(
   GroupBy(
      AddColumns(
         'Balance Leave Masterlist',
         "StaffName",
         Employee.DisplayName
      ),
      "StaffName",
      "LeaveType",
      "Data"
   ),
   "LeaveNo",
   CountRows(Data),
   "AllowedCreditLeave",
   Sum(Data,Allowable),
   "UsedLeave",
   Sum(Data,Used),
   "LeaveBalance",
   Sum(Data,TotalBalance)
)

 

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
Super User
Super User

Hi @Manilyn0509 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,829)