cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

'Get Items' does not return all columns in Sharepoint List

Has anyone faced this before? What am I missing?

Scenario1:

  • Trigger: Button push
  • Action1: Get Items from Sharepoint List
  • Action2: Create .csv (automatic headers)
  • Action 3: Send email (with .csv as attachment)
  • Works fine EXCEPT there are columns missing from the Sharepoint list (6 columns!)

Scenario2:

  • Trigger: Button push
  • Action1: Send HTTP Request to Sharepoint list
    • GET with _api/web/lists/GetByTitle('LISTNAMEHERE')/items as the "Uri"
       
  • Action2: Parse JSON (parse the response from above)
  • Action3: Compose (grab the nested array from JSON using outputs(['ParseJson']?['body']?['d']?['results']
  • Action4: Create CSV (from Body of Compose action)
  • Action5: Send email (with .csv as attachment)
  • Works fine and returns ALL COLUMNS in the Sharepoint list

Why partial results with Get Items?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

The Get Items action normally brings back a limited set of columns to improve performance.  Make sure you open up the advanced properties and set the Limit Columns by View to Use all columns (do not limit) to get all the columns.

screenshot.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

19 REPLIES 19
Pstork1
Dual Super User III
Dual Super User III

The Get Items action normally brings back a limited set of columns to improve performance.  Make sure you open up the advanced properties and set the Limit Columns by View to Use all columns (do not limit) to get all the columns.

screenshot.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

ericonline
Community Champion
Community Champion

Does not work on lists larger than 5k records. Bummer.

Moving to trying 'Send HTTP Request to Sharepoint' action.

@Pstork1 , do you know what HTTP query Sharepoint uses when you click "Export to Excel" from a Sharepoint list? 

This is the query I need. Can't figure out how to view request using F12 in Chrome.
Thank yoU!

Pstork1
Dual Super User III
Dual Super User III

I'm not sure that's done through an HTTP query.  But if it is the best way to get it would probably be to use something like Wireshark or Fiddler.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
ericonline
Community Champion
Community Champion

@Pstork1 , thanks for the quick reply. Yeah, I can't use those tools within my org (proxies, firewalls, etc.)

If anyone can pull this, might be useful workaround to the cumbersome workflow for pulling SP List items >5k.

Ended up closely following this blog post: https://blogs.msdn.microsoft.com/svarukala/2017/08/08/iterate-and-get-all-items-from-a-sharepoint-la...

Have all ~35k records pulled from this list, but having troubles appending each 5k pull to the same .json file for export.

I'll get it!

In our case, it didn't work even choosing: "Use all columns (Do not limit)".

 

Our list has 19 columns and it's getting only 11 columns.

Anonymous
Not applicable

I only have 240 list items and Get Items with return all colums set does not work. Seem like every component of this softwars suite has serious gotchas. I guess I have to find a work around because Microsoft has let us down, yet again. Sorry MS your stuff is not ready for prime time.

 

If only this stuff worked as well as a LAMP stack.

Sigh

@Anonymous, try moving to the 'Send HTTP Request to Sharepoint' action.

 

Docs here: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service?tabs=csom

Pstork1
Dual Super User III
Dual Super User III

Unless you are running into memory limitations due to really big columns there shouldn't be any reason that you can't get all the columns when you tell it not to limit based on Columns.  Have you tried creating a view that has the columns you need and then setting the Get Items to use that View?  What columns are missing when you set it to not limit columns based on a view?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Yes I have tried selecting a view that shows the columns I am wanting to retrieve.

I have used the return all columns and automatic table columns in the create html table that follows. The column is not returned.

 

Ironically the column I want to retrieve is where I document the turn backs our machinists face. Turn back being something that prevents the machinist from doing his/her work.

PowerApps finds it

SharePoint, no problem

Flow nope ain't happening.

 

So now I guess I have my very own turnback. 

not much fun, not impressed.

Anonymous
Not applicable

Thanks, I'll look into that.

Pstork1
Dual Super User III
Dual Super User III

What type of column is it? 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

The field is single line of text so should be easy example content 'GW IW TW'

Anonymous
Not applicable

On a fun note, Microsoft Access finds the field also. Of course it's a table in Access and a list in SharePoint because well wtf I have not idea why lists aren't tables and columns aren't fields.

 

SMFH

Hi jbenetti

 

Did you get any sort of resolution to this as I am seeing this with Power Automate (the new name for Flow) ?

 

Have tried everything mentioned here, don't really want to start messing around with html query hacks to extract basic information from a SharePoint list.

 

Similar struggle but with Get File Properties.

 

Checked all the things including triple checking that mysteriously excluded columns had same settings as columns that were included, not restricting to column views, restricting column views... it was quite a crap time (not to mention the waste of time).

 

Ended up deleting the offending column, making a new one, creating a brand new restricted view and refreshing all the parameters in my flow (e.g. swapping to another site then swapping back in the hope that it would force some sort of refresh).

 

Finally got the columns I wanted included.  I'm lucky my columns pick up their values from a spreadsheet so deleting one was not such a big deal.  Needless to say it shouldn't have been that hard to get a simple Get File Properties to work 😕

Deleting the field and adding it again on the list fixed the problem for me as well.

In my case it was two taxonomy fields that was giving the problem, both were published from the content type hub. After deleting and re-adding the first one, both started returning data.

 

Thank you.

JEEZUMS - is there not really a better way?

 

I was running into the same problem. A lookup column on list was not showing up in Get List action, no matter how I configured views or the PA Get Items action. I tried changing column names, column settings, creating new views, changing the PA limit to view settings, just about everything I could think of and got to the point of just throwing random crap at the wall to see if ANYTHING sticks. 

 

After reading this, I gave in and deleted and re-create the column, and then ALL OF MY COLUMNS disappeared from Get Items, even when limit items was set to All Columns. 

 

It was not until I completely destroyed the list, re-created from scratch, then destroyed PA action and recreated from scratch that my columns showed up, even when the new list and new PA flow are identical. I can only assume something about the way Sharepoint is appending metadata to the internal IDs that are included in the API call that PA generates has some kind of caching problem, and metadata is not keeping up when changes are made. 

 

Two days of fussing to get to this point, and this was a new development. I can only imagine the chaos this "solution" would pose to a list that is already developed, full of data, and deeply rooted in processes. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,331)