Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

View selections - tricky one!

Posted on 2000-02-28
7
Medium Priority
?
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 450 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

722 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