Solved

combine fields

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now