1

I have set up this to pull and view all tasks from project subsites on the root home page, which works great - http://aghy.hu/display-template-for-tasks-in-sharepoint-2013

The only issue is that they are not sorted in any way. I attempted to create a managed property for DueDate in the search schema but in SP online you cannot create managed properties for date & time, only amend spare predefined ones that Microsoft have placed in there, yesterday I used RefinableDate01, mapped it to the crawled property of ows_duedate and set the Alias to DueDate.

When I go to the results core, on the sorting tab I select RefinableDate01, switching from ascending or Decsending doesn't change anything sorting wise.

If this helps this is my search query (which worts great)

ContentTypeId:0x0108* (IsDocument:"True" OR contentclass:"STS_ListItem") AssignedTo={User.Name} PercentCompleteOWSNMBR<>1 Path:https:///projects

enter image description here

enter image description here

enter image description here

  • I have been doing some research and this blog shows I am on the right track (surfray.com/blog/2013/06/17/…) He seems to be able to select DueDate from the managed property in sorting, that is not there for me, it may be because he is on prem and I am trying to do this with O365 – Jamie_lee Aug 12 '15 at 12:57
1

You have to set the JSON property of your Web Part. It sounds weird as you don't want the dropdown with the available sorts order displayed. You just have to tweak the JSON property to add the RefinableDate01 and then uncheck the "Show sort dropdown" property so the sort box isn't displayed but the JSON will remains.

REF:

http://www.habaneroconsulting.com/insights/why-are-my-sort-orders-not-working-in-my-sharepoint-2013-search-results-web-part#.Vc02Ofl_Oko

http://stevemannspath.blogspot.ca/2013/03/sharepoint-2013-allowing-users-to-sort.html

  • Thanks for this, I was at a dead end. I created this from the links you provided. [ { "name":"DueDate (newest to oldest)", "sorts":[ { "p":"DueDateOWSDATE", "d":1 } ] } But it still doesn't seem to sort – Jamie_lee Aug 17 '15 at 10:40
0

Thanks for helping with this @Charles Fiset

What you said was in fact correct, it turned out that the managed property that I created (RefinableDate01) did not pick up any of the task due dates for tasks that were created before the managed property was created when it crawled, essentially leaving that field blank and unsortable in the search results.

Once I recreated the tasks they all sorted exactly as they should have

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.