List view – only show parent rows with vLookup data

Forums vLooup for SharePoint List view – only show parent rows with vLookup data

This topic contains 0 replies, has 1 voice, and was last updated by  AdamP 1 year, 9 months ago.

  • Author
  • #19452


    I’ve got a need to only display rows in the parent list when they have vLookup child items, basically a high level filter of the parent list using data from the child list.
    Unfortunately the vLookupIsLoadedCallback doesn’t work for list views;

    Please note that this code does NOT trigger in a list view, only in NewForm, DispForm and EditForm.

    I think I’ve come up with a reasonable method to achieve what I need, but would welcome feedback and ideas to improve on it. This snippet is added to a CEWP below the list and CEWP containing vLookup_ListView.html;

    $( “span.vLookupNoItemsLabel” )
    .closest( “” )
    }, 2000);

    It runs on a 2 second interval, looks for the vLookupNoItemsLabel class in the list view, then hides the associated table row for the parent item. I think the 2 second interval should account for grouping expand/collapse and delayed or slow loading of the vLookup. See attached a couple of images standard/filtered

    Any thoughts?


    • This topic was modified 1 year, 9 months ago by  AdamP.

You must be logged in to reply to this topic.