0

I have several different task lists in an online SharePoint site. I want the Web Part to display links to task lists that contain overdue tasks.

I have the logic set to display where Due Date < Today, and Task Status =! Completed.

This displays all the individual tasks that are overdue:

enter image description here

However, I actually want to display links to the entire task lists that contain overdue tasks, rather than the tasks themselves.

I believe the functionality is somewhere within these Presentation fields: enter image description here

What do I need to do to achieve this?

I need to change the url from the individual task to the list as a whole, but I don't know where exactly. Here is the XSL code:

enter image description here

enter image description here

  • 2
    What properties are you trying to map? – Christoffer Jul 7 '17 at 13:54
  • @Christoffer I want to display links to Task Lists that contain "Overdue" in the Task Progress column in any of their tasks – mhtedford Jul 7 '17 at 14:43
  • 1
    Usually when I get this error it's because of something being wrong in the Presentation section of my web part properties. Can you please share those details with us so we can analyze them for you? – Brendan W Jul 7 '17 at 22:13
  • @BrendanW I added a picture of my Presentation section – mhtedford Jul 10 '17 at 15:18
  • I notice that you have selected "Next Gen Room Content Type" in your Query section as a custom content type. Is that needed? Try removing it and setting it back to All Content Types. – Ransher Singh Jul 10 '17 at 16:49
1

I can point you to what you need to do to achieve this (in the interest of time). You will need to edit the CQWP and it's associated Style Sheet to get the task list ID/URL. The current URL that is being fetched is directly to the task instead of the task list. So what you need to do is for each item, get the parent task list id and then construct the "correct" URL that you can refer to in the style sheet.

For details on how to go about editing the XSL and webpart, refer this link.

  • I found the XSL code for my web part, but I don't know where to change from the task url to the task list url: – mhtedford Jul 10 '17 at 18:18
  • 1
    Again, just pointing you in the right direction. What you have is the .webpart file in your screenshot above. This by default will refer to ItemStyle.xsl file in your Style Library --> XSL Style Sheets in Site Contents. This file is what needs to be edited to get the field that you want. I would advise against editing the file, instead you can create a copy and rename it. The new file needs to be referenced in the .webpart file above. A better step by step example is also available here codeproject.com/Articles/756834/… – Ransher Singh Jul 10 '17 at 18:47
  • I'm still unclear on what exact steps I need to take. Do I need to edit the .webpart file at all or just the ItemStyle.xsl? What do I need to add to the ItemStyle.xsl file? – mhtedford Jul 10 '17 at 20:30

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.