cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

data table from sharepoint list does not display person column

All I want to do is display my list created in sharepoint where most columns are people since it is a contact table.
But when loading the data to powerapps the people are not shown...

7 REPLIES 7
Highlighted
Super User
Super User

Re: data table from sharepoint list does not display person column

@gonzna3 

Please check your settings on your SharePoint people column.  You most likely have it defined to allow multiple selected.  The DataTable will not be able to display that information.

Easiest answer if you don't need multiple people in a column, then turn that off.

 

If you need to have this as multiple people, then you will need to pre-shape the data to your table (Items property of your DataTable):

   AddColumns(yourDataSource, "multiPeopleCol", Concat(yourMultiPeopleColumnName, DisplayName & ", "))

Then add the "multiPeopleCol" to your DataTable fields.

 

This will give you what you want.

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
New Member

Re: data table from sharepoint list does not display person column

@RandyHayes I do need multiple.

 

Is this a step to do in the sharepoint list?

Do you have a step by step article?

 

where would the below line be?
AddColumns(yourDataSource, "multiPeopleCol", Concat(yourMultiPeopleColumnName, DisplayName & ", "))

Highlighted
Super User
Super User

Re: data table from sharepoint list does not display person column

@gonzna3 

Is this a step to do in the sharepoint list? 

No, if you need multiple, then you don't need to change anything on the SharePoint list, as it is already set to multple people.

Do you have a step by step article?

Well, there really only is one step (maybe two).

1 - Change the Items Property of your DataTable to:

    AddColumns(yourDataSource, "multiPeopleCol", Concat(yourMultiPeopleColumnName, DisplayName & ", "))

Replace the "yourDataSource" with the name of your data source (most likely what is already listed in the DataTable Items property).  Replace the yourMultiPeopleColumnName with the name of the column in your SharePoint list that is a multi-people column.  The multiPeopleCol is free-form.  You can call it whatever you want - it will become the column header of your datatable.

2 - Click on edit fields for the DataTable and then check on the multiPeopleCol field (or whatever you ended up calling it).

 

That's it...


 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
New Member

Re: data table from sharepoint list does not display person column

@RandyHayes Ok. thanks!

This works, but I have some rows with ,multi and some single person... the single person and the multi at the end have a ",". Is there a way to avoid this?
Also view is long not split or under each other?

 

why cant powerapps just literally show me the list/table?

seems like waste of time and functionality...

I also have 5 columns with multi in this table, seems i cant do this for more than 1 column to so does not work...

 

 

 

 

Highlighted
Super User
Super User

Re: data table from sharepoint list does not display person column

@gonzna3 

 

This works, but I have some rows with ,multi and some single person... the single person and the multi at the end have a ",". Is there a way to avoid this?


You can change your formula to this to drop the final ",":

AddColumns(yourDataSource, 
                     "multiPeopleCol", 
                     Left(Concat(yourMultiPeopleColumnName, DisplayName & ", "),
                       Len(Concat(yourMultiPeopleColumnName, DisplayName & ", "))-2) //drops last two characters
                    )

 

Also view is long not split or under each other?

You will not be be able to do that with a DataTable control.  They are single line only. 

 

why cant powerapps just literally show me the list/table?

seems like waste of time and functionality...

I'm not sure what you mean by waste of time and functionality.  The DataTable does exactly what it does.  It has VERY limited formatting and control over it.  This is why the Gallery, rather than DataTable, is the better choice for a control when doing a list where you need to control parts of it individually.

 

I also have 5 columns with multi in this table, seems i cant do this for more than 1 column to so does not work...

You can do this for as many columns as you want. I only demonstrated one as I don't know your column names and it would be repetitive otherwise.

But, if you wanted more, just add them on the AddColumns function:

   AddColumns(yourDtaSource, "Col1Name", theFunctionAbove, "Col2Name", theFunctionAbove, "Col3Name", theFunctionAbove...etc, etc.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
New Member

Re: data table from sharepoint list does not display person column

Ah, I see what you mean.

 

Once I try to keep adding more columns to the formula I get "The function Concat has some invalid arguments"


AddColumns(NORTHEAST_1,

"DELAWARE VALLEY",

Left(Concat(DelawareValley, DisplayName & ", "),

Len(Concat(DelawareValley, DisplayName & ", "))-2),

"NY METRO",

Left(Concat(NYMetro, DisplayName & ", "),

Len(Concat(NYMetro, DisplayName & ", "))-2))

 

 

Highlighted
Super User
Super User

Re: data table from sharepoint list does not display person column

@gonzna3 

At a glance, your syntax looks correct - what specifically is it saying is an invalid argument?  There should be a part that has a darker red line under it.

 

But again...remember from what I mentioned - you're only going to get so far using a DataTable.  If you want real control over the format, then you need to explore the Gallery instead.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,325)