cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gonzna3
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
RandyHayes
Super User
Super User

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@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 & ", "))

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@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...

 

 

 

 

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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))

 

 

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,907)