1

How can I implement parent child relationship inside a document library. The document library will have different documents for countries. The same document library will have documents for states belonging to different countries.

I need to maintain parent child relationship of all these documents and I don't want separate list to be created for this.

Thanks Alam

4 Answers 4

1

If you aren't going to use folders, then you'll want multiple metadata columns, one for country, one for state. Then you can use document library views to group by country then by state to get a folder like view of the relational data.

0

Depending on the version of SharePoint Online you're using you might have Managed Metadata. If you have then a TermSet with Continent => Countries => States => Cities => ... might be exactly what you need.

Hint to enable Manage Metadata if available but not enabled: Enabling Managed Metadata in Office365 (includes download)

0

I just came across this post in a search so this reply might be a bit late. One way to create parent-child metadata is to use the look up column type. For a State/Country term, first create a custom list and enter the names of all the countries' States. Add a choice field listing all Countries and then select the correct Country for each State. Also, add a calculated column that copies the Country column (otherwise the look up won't see this value). Then, in the library or list that you want to use the State/Country metadata, create a look up column that references your custom list. The main value in the look up column will default to the State (the Title column). The Country value will appear below (the calculated column) as an ancillary value so just tick it. Presto, when you select the State in the look up column the Country value will come with it automatically. Sounds complicated as write it but it's actually quite straightforward. The only trick is adding the calculated column to copy the Country value in your custom list. Another advantage to using this look up approach is that if you change the metadata in your custom list it will automatically update the values in the library/list that looks it up. This means you can re-classify library/list entries in one go without affecting version numbering.

-1

Assuming I understand correctly what you need, it's not exactly parent-child relationship. It seems you need something like hierarchical categories.

Most obvious: use folders. Create hierarchical folder structure for countries and states, and then place your documents inside the folders, and you're done.

Another option could be, for example, to create a list for countries, and then add lookup column to your document library, and maintain it. If you have countries and then states, you can use Infopath and create cascading dropdowns, as it is described in the following article:

4
  • We don't want folders fyi. And the problem is we don't want to manually add documents. The process will be automated one i.e. Documents will have add ins and on click of these documents will be placed inside the document library.
    – alam235
    Commented May 11, 2012 at 8:56
  • In this case, consider Drop Off Library feature. Please refer this article for details: sharepointedutech.com/2010/02/22/… Commented May 11, 2012 at 10:59
  • And anyway, please reflect your question to include the requirements mentioned above, because obviously the question was initially inaccurate and sadly I spent my time for nothing, writing all these things down for you. Commented May 11, 2012 at 11:03
  • I am sorry Andre for this.
    – alam235
    Commented May 12, 2012 at 5:51

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.