cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DavidLaz
Frequent Visitor

SharePoint List to collection issue (What in the id10t did I do wrong)

The top table is loaded from my Sharepoint Litst. The bottom table is the collection that the list was loaded into. Im just doing the clearcollect function. 

 

 

DavidLaz_0-1651678947132.png

 

What did I break? 

 

8 REPLIES 8
AsanKani
Skilled Sharer
Skilled Sharer

Hi @DavidLaz 
Let me know the error message and what here you do explain more...

The issue is that the content fields aren't matching up. 

Hi @DavidLaz 

You are using Bottom table with collection. Let me know the Collection coding where to collect. and where to use clear collect? 

DavidLaz
Frequent Visitor

yes the bottom table is directly showing the collection created by Collect(inspectors1, 'Livestock Inspectors')

Hi @DavidLaz 

Ok. Where to use ClearCollect function?

You can directly use ClearCollect(inspectors1, 'Livestock Inspectors'). What do you say ?

Still you are not give enough data... like below
Collection used data Livestock inspectors from where?

Why/where you used clearcollect function? what is the purpose?

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 or you liked the post and want to show some appreciation, please give it a Thumbs

VishuS
Super User
Super User

Hi @DavidLaz ,

 

Is that a screenshot from DataTable or Gallery control in your application? Wich displays records from the List and Collection respectively? 
If yes, then you can't display Author or Editor directly in the Label fields of DataTable or Gallery. 
You have to use either Author.DisplayName or (Email, claims, Jobtitle, Department, Picture (in image control), etc. ) of the Author or Editor to display it on the table.

(ex. ThisItem.'Created By'.DisplayName &

ThisItem.Author.DisplayName &

ThisItem.Author.Email &

ThisItem.Author.Department, etc.

).

If there is any Lookup or choice field then append ThisItem.FieldName.Value
Refer screenshot below,

VishuS_0-1651731771889.png

There is no error in "ClearCollect(CollectDemo,TestDemo)" here "CollectDemo" is Collection & "TestDemo" is List.
___________________________________________________________________________________________________________________________________
If this post helps you to resolve your issue, then mark it as an answer/ solution for future reference.

DavidLaz
Frequent Visitor

The top data table is directly refrencing the sharpoint list 

 

the second is referencing a collection that was built using the clearcollect control and the list. 

 

if you look the bottom table doesn't have the correct field names instead it's feild_1 feild_2 ..... 

Hi @DavidLaz ,

Refer to my previous reply. 
I suggest you verify column names in the collection (From the view tab => select collections=> verify Fields names in your Collection.)

  • Consider your Fields name is field_1 (Single or Multiline Text field ) then ThisItem.field_1 will be the text property for the respective column inside your Data Table/ Gallery.
  • If it is the Person column then ThisItem.field_1.DisplayName or ThisItem.field_1.Email will be the text property for the respective column.  
  • If it is the Choice or Lookup column then ThisItem.field_1.Value will be the text property for the respective column.  

___________________________________________________________________________________________________
If this post helps you to resolve your issue 👍, then mark it as an answer/ solution ✔️ for future reference.

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 (2,212)