-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Fields #59
Comments
Hello, By default i think sharepoint only returns the fields that are part of the default view. You can get around this when using the query() syntax in a few ways. Easiest is just add the
Although that can be a little inefficient as it has to do two queries (one to get the fields list from sharepoint, then a second to query the data from them). If you know what the fields are its best just to hardcode them (or maybe just cache them in an array) then pass the list to the
The final option would be to create a new view in sharepoint, then get the API to request the list using that view when retriving date. You can do that with the
Hope that helps |
Thanks for your comment! I tried the all_fields() method but it gave me an error. I also tried creating a view with all fields present, but no joy. I thought that maybe all_fields() was legacy or not supported since it wasn't mentioned in the comments on the API. On initial glance I thought I was using the most recent version of the API but I'll do some more searching as I inherited some parts of the code from a colleague. Thanks again for your reply! |
Hmm it should be working - Do you know what version of sharepoint your using? Probably also worth checking how up to date the copy of the library your using is, as quite a few new features got added a few months back (including a lot of the fields stuff). Biggest give away for the newer versions is it now uses namespacing. |
It's a stripped down version of SharePoint for the company, but it might actually be 2010 and not 2007 (2010 introduced the ribbon, which we have). I looked at the API version and here is the relevant parts of the header
I think it is older. I have tried to play with the newer version but I keep getting ___ class not found errors (I believe related to the namespace?); I change a couple things that clear one class error then another pops up. To be honest I am self taught on many of these things so the old adage of "Knows enough to get into trouble but not out..." applies. I'm not sure if it's an issue with my server config or what (PHP Version 5.5.10 on Windows Server 2008). Thanks for your help so far. I'll keep tinkering and see if anything works. If you see any blatantly obvious fixes let me know ;-) |
Hmm, yea the version sounds like its from a fairly old copy of the library. With the new code, in theory all you should need to do is include the autoloader (either composers if you are using that or the one in You could alternatively just use the full
Would it be possible to post the errors your getting? |
Not heard back since my last reply so am closing for now. Feel free to update & i'd be happy to reopen :) |
I apologize I haven't replied! I found out that there was an error in the display function I wrote to trouble shoot some of the issues. So you're good :-) I've been shipped around the globe since my original post so I haven't had time to try the new version, but I hope to get time eventually. I appreciate your help! |
Love it, however when I do a get() or query() not all the fields will be returned. I know they exist and they can be interacted with because I am able to do an update or insert action. At first I thought it was only field types with multiple lines of text (that was the first type I noticed) but there does not appear to be any pattern associated with the field type (the multiple lines of text's are all set to plain text just in case you were curious). I have quite a few fields that I have defined (~70+).
The text was updated successfully, but these errors were encountered: