Solved

View selections - tricky one!

Posted on 2000-02-28
7
199 Views
Last Modified: 2013-12-18
Hey all,

Got a tricky question for you.
Hopefully I can explain things properly!

To start with I am creating a Leave database. We are linked to DB2 to get user information via ODBC. This comes down from DECS using a userid which in turn is derived from the notes.ini (via @environment) - with me so far?

After a leave form is created, I want to the users manager to be able to see that form from a view. For example. I create a leave form using my userid meg03. I want my manager (and only my manager) to be able to see that form in a view so he can approve/reject it.

To be able to get my managers Userid I need my userid - and this only comes out with an Environment statement (@Environment doesnt work in view selections).

Currently, I have a field called Created which is populated with my name (my notes name Mat Egan/SYD/Org so that I can view only my leave requests - this works ok. I cant do the same thing for my manager as I only have his UserID (not his notes name).

Any suggestions would be welcome!

Im toying with the idea of using NotesCollections or something like that. Could I use script to move all the documents that match the criteria into a view that I can create on the fly? What about putting them in a temporary folder and then opening that folder ? How do I accomplish that?

looking forward to some creative suggestions!

Mat

Mat
0
Comment
Question by:prenexus
7 Comments
 
LVL 2

Expert Comment

by:Paebdb
ID: 2567952
Normally the way would be that you build the hierarchy of your organisation with documents in the same or another database.
So you would have a doc for a department, a field in it is the name of the supervisor, and for each employee you have a field with the department name. On this way you can handle flexible future changes in the organisation.
Now when you create your leave doc, you can look up over the department code the name of the supervisor and populate a field in the doc with it, which will also solve your problem with the view.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2568241
Hi prenexus,

I agree to paebdb's Approach.
Also use Readers Field and change the content of this field dynamically based on the status and username so that that document will be available only for the intended person.

This may avoid unnecessary temporary folders,

Good Luck !

-Arun
0
 

Author Comment

by:prenexus
ID: 2570606
Thanks for the comments.

We have the organisations hierachy in DB2 tables on the mainframe, and we were looking to avoid having duplicate data in Notes as well.

Does anyone have some code that moves things to another folder and then opens that folder?
(For a button from a Navigator perhaps?)

Thanks,

Mat
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Expert Comment

by:sam_clayton
ID: 2591605
We have a HR database in our data warehouse.
I wrote an agent that runs nightly against the database (via ODBC) and updates a manager field in the person's NAB entry (it enters the UNID of the managers person document)
I found this was sufficient to build a structure chart (when the update was expanded to include job titles etc it was even better)
When a person composes a doc for them and their manager it the doc library finds the author in the NAB, get's the manager's person doc unid, then gets that doc and uses that info to fill in the Readers field.
Seems long-winded I know, but it is quite flexible.
(ie you can set up authorisation chains where anyone of management grade above you in company structure can authorise things etc)

cya,
sam
0
 

Accepted Solution

by:
ikke_de_steve earned 150 total points
ID: 2603905
You have to use reader fields, that clear.

In that field you have to put your name and that of your manager(approver).

His name you have to get from a profile document.

You have to create a profile document for each user that use the database.

In that profile document you just place the managers name.

than you can get the profile field by 2 simple functions.

@GetProfileField ("Profiledocument";"Profilefield")
or
@SetProfileField("Profiledocument";"Profilefield"; New value)

in script:

set notesdoc = notesdb.getprofiledocument("profiledocument")

Good luck
Ikke De Steve

PS: This will only work R5.
If not R5, let me know, there is an solution for R4 also. Only a bit more complicated.
0
 

Expert Comment

by:sam_clayton
ID: 2604045
I have to say I shy away from using profile documents, probably just a personal prejudice.
0
 

Author Comment

by:prenexus
ID: 2610218
Thanks for the help!

Ive modified your answer a little bit and dont use a profile document.

Ive got another database which is doing a lookup of the userid and replacing it with the notes name.
For eg meg03 = Mat Egan/SYD/Org

That way I can replace the userids with the managers names and use them as the readers and author fields.

Thanks for the help!

Mat
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus notes forward mail problem 5 404
Connect SQL Server from Lotus Domino Application 7 347
Disable Return Receipt In Lotus Notes 15 252
Cannot access mail archive from IBM domino 5 103
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question