What is the “best” approach to linking(relating) documents together? Specifically for creating a reporting structure hierarchy similar to this:
Exec
-Director
–Supervisor
—Employee
What is the “best” approach to linking(relating) documents together? Specifically for creating a reporting structure hierarchy similar to this:
Exec
-Director
–Supervisor
—Employee
Subject: Linking document by key vs. parent/child?
There’s no one best way to represent this type of information. It depends what you want to do with it and how you will update it.
Provided each employee is linked to exactly one manager, you could in theory use a response/parent relationship. However, I don’t like to do this when it results in a single immense hierarchy. I would probably either just put the manager’s name into a field of the document and make them all main docs, or else establish a separate organizational hierarchy and have each user’s record refer to their organizational unit and tell what organizational unit they manage.
The advantages to not using a response hierarchy for this are
It’s easier to create views and agents and whatnot without worrying about having two separate forms (one with only one document of that form).
If someone changes their job, you can just edit the fields in their record instead of either (a) cutting and pasting the record, or (b) deleting it and creating a new record in the appropriate place.
You’re going to need copies of some information in records anyway if you want to display it in views (e.g. managers by employee last name). If all you have is a $REF to the parent, a view can’t display fields from the parent. If you have to copy the manager name into other documents anyway, might as well make that the reference information so that you don’t have to worry about keeping them in synch.
Have you considered whether you can use the organizational information fields already present in the Domino Directory? And if not that, have you looked at the Lotus Workflow Organizational Directory? I’m not sure what the licensing considerations are in using the Workflow directory design if you don’t use LW, but you could at least look at the design for ideas.
Subject: RE: Linking document by key vs. parent/child?
IS there a place that I can download the Lotus Workflow Directory so I can view the design?
I want to setup the directory structue by using position profiles and I will assign employees to those profiles. Employees tend to change more than the postion structure thus it will be easier to maintain.
Each position will have the position that it reports too in the document so it’s easy to build a view showing who reports directly to who. The problem I have is showing the whole structure because it can be several levels deep.
Any ideas?
Subject: Linking document by key vs. parent/child?
Hello Steven,
I don’t recomend using the parent / child structure at all, except in very limited situations such as a disucssion database.
Parent / Child structures are unreliable because the only link is the content of the $REF field. Should you need to copy an existing document, the ID will change and the $REF field on its child document won’t.
You can inherit values from a “parent” document even if both documents are “main topic” documents, so you don’t need the response structure for this.
The only really good advantage of a child / parent structure is that they can be displayed pretty neatly in a hierarchical structure in a Notes view. Even that advantage is limited, however, since a response column in a view can only show one single formula - so if you have several fields to show, you have no choices but to append them one to another in a long string:
For example, in the above hierarchy, the first line (Esprit de Corps) is a category.
The company profile document and the contact document are both “main topic” document; they are “linked” only through their sharing the same company field.
The 4th document, the support action, is a child of the contact document. It is neatly indented to the right because it is identified by the view as a child; however, I had to add several fields (the text date, the action type, a short title, and the author between parenthesis) as a single long text compted formula, because the response column can only contain 1 formula.
IMHO, the best way to link 2 documents would be the following:
The formula for this field is: @Unique
This will insure the Notes client creates a unique ID for your document. Do not use @DocumentUniqueID; because if you do so, the ID will be different when you copy the document, where as @unique is not relative to the current document.
This document can also have its own DocKey field.
AND SO ON…
(e.g., you know the parent ID, you lookup the parent name, address, phone and so on into its child).
Let me know if you need further assistance.
Good luck!
Nicolas Abesdris
Quintessence e-solutions Inc.
Subject: RE: Linking document by key vs. parent/child?
Thanks Nicolas, I understand most of what you are saying. Would you be willing to share some examples outside this forum?
email: scowger@w-link.net
Subject: RE: Linking document by key vs. parent/child?
Well, it is not easy to send examples across email; but if you have more precise questions, I can see if I can help you with some answers!
Just send me your questions at:
nicolas@quint.ca
Good luck!
Nicolas Abesdris
Subject: RE: Linking document by key vs. parent/child?
Hi,
Can you maybe add an example of how to create a view using these constructs? I’m quite new to domino, so I’ve no experience in creating custom views.
So I already have the constructs to create documents containing parent references using @Unique id’s, now I would like to know how I could sort these into a hierarchical view. Any suggestions?
Regards,
Wouter de Vaal
Subject: Linking document by key vs. parent/child?
ignore
Subject: RE: Linking document by key vs. parent/child?
Thanks, Raymond. I will take a look at it. Very much appreciated.