I'm wondering if there is a way to get the SharePoint list id from a drive item data.
I know the opposite way is is possible with
GET /sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem
For example I'm using the enpoint GET /drives/{drive-id}/root/search(q='{search-text}')
To search for files and folders within a SharePoint drive. This search returns details for the drive item. If a file exists I would like to update the corresponding list item, but I can't find a way to extract the list id for a drive Item data.
You can expand listItem property of driveItem
GET /sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem?$expand=listItem
GET /drives/{drive-id}/items/{item-id}?$expand=listItem
Resource:
driveItem relationships
Related
I want to get the the display title of the list, related to search result item in SharePoint search.
Result have OriginalPath and ParentLink values. But those are links to the list with internal name. But i could not find either display title or GUID of the list.
Please let me know how get either display title or GUID of the list.
You can use the SharePoint REST service to get the search results in a XML format which return all the fields and their values.
Querying with the Search REST service - https://msdn.microsoft.com/en-in/library/office/jj163876.aspx
You can construct the GET request URL with the query parameters as follows:
http://server/_api/search/query?query_parameter=value&query_parameter=value
The SharePoint 2013 Search Query Tool is a handy tool to quickly get the search results in XML format - https://sp2013searchtool.codeplex.com/
Found this post which describes how to get the list title of a search result item in a display template.
Since there is no managed property which contains the list title by default, the display template adds the list title to each item by retrieving it via a REST call using the web URL and the list ID.
https://github.com/SPCSR/DisplayTemplates/tree/master/Search%20Display%20Templates/Retrieve%20the%20list%20name%20in%20a%20display%20template
Im trying to create a Unique sub list within a list in Sharepoint Online (2013).
I realize that sub lists arent exactly possible and you can use lookup fields to attach another list. This doesn't seem like it will work for my situation.
I am trying to have a list item that allows you to upload unique files per list item. For Example:
Reports May 2015
---School.xml
---Food.xml
Reports Jun 2016
---University.xml
---Beach.xml
Each list item will have a set of unique files related to it.The user needs to be able to make the List item themselves (Reports ... in this case), this will of course have other fields and descriptions attached to it (hence the list) and then be able to upload unique documents to that list item.
Im having problems figuring out how to do this in SharePoint. If there is another way to go about this better i am up for it.
You're right - sublists aren't a thing in SharePoint. Reading your requirements, I'm not sure if you need two lists to get what your looking for. Would it be possible to have a single Document Library with a custom field for "Category" or "Report Month". This field could either be a Single line of text field or Choice field. From there you could create a custom view to group by this field and give the hierarchical view from your example.
If you need separate metadata for the grouping/top level, you may need to use Lookups. If I was putting together the solution, I would set up a List and a corresponding Library with a Lookup field to the List. Each of the documents uploaded to the Library would reference the List via that Lookup. To provide an interface for interacting with both within the same view, you'd need to frontend it with some custom code such as a SharePoint-Hosted App.
I successfully went into designer and changed the url and name of a SharePoint list from A --> B. However the items in the list still have the name "A" in the url so they will not open anymore now that the url of the list is B. I have a few thousand items in the list so is there anyway to make the change in the list name reflect in the url of the items as well?
You might want to try renaming it through SharePoint Designer to see if does the job the UI left incomplete.
A harder way to achieve the same objective would be saving the list as a template (including its contents), creating a new list based on that template using the desired name, and then deleting the original list.
Here is the procedure to saving and creating lists as templates:
https://support.office.com/en-US/Article/Manage-list-templates-c3884ad1-bc49-44b8-b3d6-3bc6a01eb393#bmcreate
Just curious, if I try to create a look up (relationship) from source list that is based on a custom list template, I can't access columns that users have defined on the list level (within the list). however, this doesn't seem to be the case with any other content type selection that was made to create the list from. for example, if they selected contacts content type, and define a new column on the list level, it will.....
just a bit confused here.
Are you saying that you cannot make a LookUp Field for a custom column you created?
I do not understand the question completely..
But can give an idea.
If you are able to solve your problem from sharepoint itself or somehow, you can get the schema.xml file of the list where you solved the problem by this.
[WebApplicationUrl]/_vti_bin/owssvr.dll?Cmd=ExportList&List={ListInstanceGuid}
to get the list guid of the list that you solved the problem.
go to the list settings of that list. And in the address bar you can see the list GUID.
add the web application url , then paste this line in the address bar, it will prompt to save an xml file. Save the file, open it, There you go, the schema.xml file of that list.
I am trying to append records in an MS Access table (I am using Access 2010, but can use 2007 if need be) into a linked SharePoint list.
There is an attachments field (when viewed from Access), but I am not concerned with appending these.
The SharePoint list has a few lookup fields, that in design view are of the Number format. Upsizing to SQL Server, I can confirm that they are numbers (and I assume the Id for the related SharePoint list object).
I copied the structure of the SharePoint list and pasted into a MS Access table, and then filled in a few sample records
I used the query wizard to select all of the fields of the Access table (minus the Access table's autonumbered ID and attachments), click "Append", and then selected the SharePoint list.
If I run this query, I get the error that X record(s) were not appended due to validation violation reasons, which is all of them. I've checked all field definitions and none are defined as required or have a validation constraint.
The only thing I can think of is that there is some issue with the Lookup fields, but each number Id I've checked is a valid Id.
I'm hoping for a MS Access solution, but if the only approach is to programmatically do it, could someone send me directions on how to get started with the SharePoint 3.0 SDK?
Thank you for your time.
Lookup columns are not number type even your parent items are of number type reason behind lookup column always attaches the item id of parent item.If you want to see the data in access kindly use the "export to Access" functionality available in datasheet view
I have linked to a SharePoint table, then appended directly to it from a query.
My issue is that this process takes a very long time to push up to SharePoint, then 2 times as long when first I need to delete the records currently in the list before appending.
Is there a better way to blow out and create the table while preserving the link since it is not an Access object?
Anyway I hope this may help you out some and get me some insight as well.
Regards.