SharePoint Online environment - I am trying to find a logic for a scenario. I have a Product list and a Product document library. In this list, every list item (Product) is automatically assigned a unique id and we call it Product ID [we used default ID column].

Product List

For the Product document library every individual document is tagged with a Product ID from the Product list (as a look up column). Product Doc Lib Product Id assigned to documents

For example - Product ID 1,2 and 3 are tagged with documents Test1, Test2 and Test3 respectively. I want to get the list of not selected or not tagged Product Ids, which in our case are 4 and 5 (as 4,5 are not tagged to any documents)

How to write a logic for this?

All suggestions are appreciated.


  • ve you tried setting Unique Values == Yes in the column settings?
    – Mike
    Commented Oct 27, 2017 at 23:05

1 Answer 1


You can create a lookup column in "Product List" with the reference list as "Product document library" and reference column as "ProductID (Count Related)". This column will show you, how many documents are tagged for each item in product list

Create Lookup Column: enter image description here Output in Product List: enter image description here

I hope this will solves your problem :)

  • Hello @Shantha Kumar Thambidurai how did you get Product Id (Count Related). I just see Product ID as reference column?
    – AXA240778
    Commented Nov 2, 2017 at 17:50
  • Ensure, you have selected the document library instead of same list. Commented Nov 3, 2017 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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