?
Solved

combine fields

Posted on 2004-08-31
2
Medium Priority
?
205 Views
Last Modified: 2013-12-18
Hi experts,

I have 2 Notes forms:
Form A contains: Employee Name, Job ID, Other Info...
Form B contains: Job ID, Job Name.

Now I want to create a form C which contains  Employee Name, Job Name. When user creates new document from this form, and input there Employee Name => I want  to get the Job Name where FormA.Job ID=FormB.Job ID. Please help me on how I can do this. It looks like that we bring relational database into Notes.

Thanks  a lot, Na.
0
Comment
Question by:khanhna
[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
2 Comments
 
LVL 13

Accepted Solution

by:
CRAK earned 500 total points
ID: 11940501
Create 2 views:
View 1:
select form="FormA"
column 1 (sorted): Employee name
column 2: Job ID

View 2:
select form="FormB"
column 1 (sorted): Job ID
column 2: Job name

When a name is entered on Form C, use @DbLookup to retrieve the Job ID. Use its result to perform a 2nd @DbLookup to retrieve the Job name from view 2.
Use @IsError to verify the @DbLookup results and drop the code in form C's Job name field (computed).
Designer help will provide details!

Note that the document (c) needs a recalc if you change the name, the job id or the job name in either form a, b or c!
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11940579
Dim ws As New notesuiworkspace
     Dim uidoc As notesuidocument
     Dim curdoc As notesdocument
     Dim ss As New notessession
     Dim db As notesdatabase
     Dim view As notesview
     Dim dc As notesdocumentcollection
     Dim doc As notesdocument
     
     Set uidoc=ws.currentdocument
     Set curdoc=uidoc.document
     
     Set db=ss.currentdatabase
     Set view=db.getview("YourViewName")
     Set doc=view.getdocumentbykey(curdoc.EmployeeName(0),True) 'This wil get all the documents related to Empname.
     
If not Doc is nothing
curdoc.jobno=doc.jobno(0)
curdoc.desig=doc.desig(0)
end if    
 
U can use it in SubExiting of field event. Just follow CRAK method. That will give a very simple solution. U need to know Lotus Script to know above code.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
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…
Suggested Courses

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