Solved

combine fields

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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