Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic document collection

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
I am working on modifying a Lotus Notes Leave Accounting system. Here's a little info:

1. A person requests leave - a document is created and a lookup is performed against the names.nsf to get the person's department and supervisor.

2. Depending on the type of leave requested, there may be multiple levels of approval (ie - Annual Leave only needs immediate supervisor approval, while Leave w/o Pay or Administrative Leave needs the approval of the Court Administrator).

3. Once the person submits the request, the document is emailed to the supervisor.

4. If the supervisor approves the leave and it needs no further approval, a record is written to our AS400; if there are more approval levels, the "Next Approver" field in the document is updated with the supervisor's Supervisor and is emailed for second level approval and up until all levels have been approved.

All works great! Except.....
(you knew there had to be an except!!)

Our Deputy Court Administrators are responsible for multiple divisions. For all the others in the court, the following works well for determining what information to show:

Code:
@Command([OpenView]; @Environment("Department") + " ApprovedLeave")

However, one deputy oversees:
Compliance
Customer Service
Educational Services

But, her "Department" is Administration, so when the views are opened, all she sees are ones where the Department = "Administration".

What I need to have happen is when one of the Deputy Administrators selects the Pending Requests, they get all the pending requests from all their divisions that are waiting on their approval.

So, what I was considering (and need to get input on) is this:
can I create a new document with two fields, Deputy Name and Division, then using the Division name in this document collect all the documents where the request is pending and the next approver is the administrator and show all these documents in a view? I know I can put them in a collection and copy to a folder, but all I want to do is display them in a view.


Leslie
 
Hi Leslie,

If I understand correctly, you are trying to have views load documents following a parameter ? Are they private views, or shared ?
Why don't you just use Reader fields and roles ? Assign roles to the supervisors, and set the appropriate role in the documents. That way, a given supervisor can have as many roles as he needs, and he'll see all documents that pertain to him.
Don't forget to have an administrator role by default in all documents (in a seperate field) - or else be prepared to lose documents !
Since the user should have Author access and his name in an Author field (or at least Reader when he is finished with it), the user should be able to track his own documents without problem.
As for the supervisors, give them all Editor access, so whatever they can read they can also edit, and your job is done.

Pascal.
 
actually I found a better way. I'm putting all the documents in a folder where the NextApprover equals the administrator's name. It's working pretty good, except that after I run this once, then the MainFrame frame in the database is nonexistant, see here.

Any suggestions?

me

 
I followed your link and reviewed your code. I still think that my solution would get rid of all these issues.
And you wouldn't need to exit the db to refresh the view anymore.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top