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

Creating a collection to get the display name from a People column - odd results

Hi,

 

After some words of wisdom as can't see why this isn't working.  I have a very simple SharePoint list with two columns "Employee" and "Days".  The "Employee" column is a People column and the "Days" column is a number.

 

pa-1.png

 

What I am trying to do is grab the display name from the People coloum and create a new column within the collection with this data. 

 

pa-3.png

 

However when I look at the collection it hasn't created the columns and looks like this

 

pa-2.png

 

I am not sure what's going wrong here, any ideas gratefully received.

 

Thanks

Rob

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @Rob_CTL ,

You don't need the lat two references unless you want ShowColumns to restrict the collection like the below

ClearCollect(colHoliday, 
   ShowColumns(
      AddColumns(
         Holidays, 
         "EmployeeName", 
         Employee.DisplayName
      ),
      "EmployeeName", 
      "Days",
      "Holidays"
   )
)

 

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.

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi @Rob_CTL ,

You don't need the lat two references unless you want ShowColumns to restrict the collection like the below

ClearCollect(colHoliday, 
   ShowColumns(
      AddColumns(
         Holidays, 
         "EmployeeName", 
         Employee.DisplayName
      ),
      "EmployeeName", 
      "Days",
      "Holidays"
   )
)

 

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.

View solution in original post

Thanks @WarrenBelz

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (43,380)