4

Both parts of my question have been answered other places but it is not clear if the two things I would like can happen simultaneously.

I have a standard task list that I wish to filter by a lookup column I added to the list.

  • The task items fail to filter by the SharePoint list filter until "server render" is checked (or another view other than the default is selected).
  • Checking "server render" allows filtering but breaks the checkbox functionality evidently because hierarchytaskslist.js does not load.
  • I tried a few different methods of loading hierarchytaskslist.js with "server render" checked but this results in the filter working, but the checkbox still not rendering (value shown as yes/no).

My question is, is there a way to get both the list filtering and the rendering of checkboxes to work at the same time?

  • Have you set that js file as a JSLink on the ListView? That's what Microsoft does by default to ensure it is there... But its a JSLink so other code can have removed it. But it could be server-render breaks something else and that's why MS decided to leave it out.... lots of bugs in that CSR code – Danny '365CSI' Engelman May 5 '17 at 18:01
  • @Danny'365CSI'Engelman I did add the JSLink reference and confirmed that it loaded but I'm afraid I don't fully understand the implications of server-render and JSLink, timing, etc. I also registered the SOD and loaded in a script editor, finally just inserting a copy/paste of the actual code in hierarchytaskslist.js right into the page but no combination of any of these with different views would allow for both functions to work at the same time. – Phil Detweiler May 5 '17 at 18:12
  • I am not going to test it, but if that JS file is not loaded or removed, I fear they had a problem in combo with Server Render and decided to remove/disable it. As I said, plenty of bugs in CSR. And as far as we know (after a year) CSR is not going to be available in (SPO) "Modern Experiences", so it looks like Microsoft has EOD (End Of Development) it – Danny '365CSI' Engelman May 5 '17 at 18:31
  • Interesting, thanks. I was thinking that perhaps the answer might be related to why the filtering works if a non-default view is selected (and server-render unchecked) but I'm not even clear on why this is the case... – Phil Detweiler May 5 '17 at 18:36
0

(SharePoint Server 2016)

You can use WebPart a connection to filter the values in the Task list while also retaining the checkboxes.

In my case I am creating a staff OnBoarding system. When a new Employee is entered in the OnBoarding list, a workflow generates tasks and associates them to the Employee list item through a lookup column.

Then, I added the task list to the OnBoarding list DispForm.aspx as a second webpart.

Finally, I created a connection from the task list web part to the OnBoarding list data view web part, and configured it to filter the Task list (by the lookup column) based on the ID of the OnBoarding item.

Steps:

  1. From the task list web part contextual menu, select Connection -> Get Filter Values From -> (List that provides the filter value)
  2. In the popup window that appears, set "Provider Field Name" to the field in the provider list that will be used to filter tasks. Set "Consumer Field Name" to the lookup column in the task list.
  3. Click finish and save the page

Additional Details: - I was having issues with the checkboxes functionality until I read this post on StackExchange. Using the default view seems to work best. - I have also enabled Asynchronous update and "Show Manual Refresh Button" in the task list web part settings - I have disabled Data View caching but have "Send first row to connected web parts when page loads" enabled. Not entirely sure if these settings matter, though.

Select connection -> Get Filter Values From -> <List Name> Configure the connection between web parts Showing that the task list web part is is filtered by the data view web part Showing some of the task list web part settings

| improve this answer | |

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.