Solved

combine fields

Posted on 2004-08-31
2
204 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 125 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

Industry Leaders: 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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

726 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