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
Related
I have the following list and document library in the same SharePoint site:
SharePoint List (Policy Inventory):
SharePoint Document Library (Policy-Working-Documents):
My current flow filters for items in the list with a review date that is +120 days from today, then it gets the files from the document library sub-folder named Test-Folder.
I am really struggling with the following:
Filtering the Get Files output so as to keep only the files with a Name that is also contained in the output of Get Items?
Send an Outlook email that contains the documents from #1 as an attachment or link. The body of the email should include the Document Name and Review Date which are provided in the Policy Inventory list.
My current flow:
Here's an example using the Get Files, Create HTML Table and Send an Email to achieve what was asked in the title:
First the Get Files and Create HTML Table -> the value in From is the collection received from the Get Files step
Then the final Send an Email step uses the output as the Body from the Create HTML Table step:
EDIT:
To filter the OData Get Files step use the following steps - Get Items from the list with file name filters
Then Initialize String Variable for the OData filter, append to that variable the following:
concat('or FileLeafRef eq', '''', items('Apply_to_each_3')?['Title'], '''')
That'll create the OData filter and use that in the Get Files step Advanced and Filter Query value.
Does anyone know how I can retrieve the NUMBER OF ITEMS in a category in netsuite?
I'm hoping for a getAttribute tag of some sort. I need the count of total items in order to create a pagination string url.
The simple method is to create a saved search with the criteria/filters you need.
You can create saved search either programmatically or by using the tools available in netsuite.
The length of the result of saved search will show the total NUMBER OF ITEMS.
NOTE : If you want, you can retrieve the entire details of each product from saved search results.
i'm using the sharepoint search result webpart and want to get a random result.
with REST it's working with query parameter sortlist=[random:seed=1]:ascending but i want to use the search webpart. It seems it's not possible to use sortlist there?
I am trying to implement custom grouping for search result items. I would like to group them by a managed property, but without using result blocks (query rules). The idea is to sort the results by the property and then compare the current item (ctx.CurrentItem) with the previous item using ctx.CurrentItem.ParentTableReference. If a new property value is detected we insert a new 'group header' (just some simple html). The problem is the ParentTableReference is undefined. Shouldn't there be such a property in current item object?
I'm implementing this in a custom search result item display template.
If you want get all items in result table, you can get ctx.CurrentGroup.ResultRows.
When i try to create a custom InfoPath form on my Orders List I get the following error:
The SharePoint list form can't be customized with InfoPath because fields of an unsupported data type are marked as required, or because fields are corrupted. In SharePoint, try deleting the columns or editing the column properties to remove the required attribute. - Product (Lookup)
Additional information:
The Site contains;
Two Site Content types Product and Order. Order does have a lookup field to product, it is a optional field so NOT required.
Two Lists. A Products list with Product as Content Type and an Orders list with Order as Content type.
The Site Collection has the SharePoint Server Enterprise Site Collection features activated. Creating custom InfoPath forms for the Products lists works without any problem.
I tried to delete my List and recreate it but it i still get the same error. Hope someone can help me with this issue.
Thanks
Apperantly this was due to to the Title field in the Content Type being a required value. Changing the lookup to the items ID solved it.
This worked for me. But if you don't want to use the ID field in your views or on the form, here are a couple tips to replace it with the Title (or other column) in your lookup field...
Replacing the IDs in the form:
In InfoPath, create a new data source for the lookup field. Follow through the prompts to find the list to lookup. Once it's added, change the Value to ID. This will now set the dropdown list in the form to display the Title values as well as properly link the IDs in the list.
Use Title (linked to item) in your list view without instead of the ID:
Create a new index in the list you're looking up for the field you want to be linked. Then go back to the main list and change the lookup back to Title (linked to item). Note that this will again break the ability to edit the form in InfoPath. Changing it back to ID will allow InfoPath editing again. Then just change it to Title (linked to item) again when done. There's probably a "right" way to do this but it works for me.
Apperantly this was due to to the Title field in the Content Type being a required value. Changing the lookup to the items ID solved it.
Simple solution to this is, create a lookup field using SharePoint List settings, and then edit the form with infopath for further design related changes. When you creates lookfield using infopath this gives above issue, i could resolve it by creating list column and then editing form with InfoPath.