Solved

combine fields

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus Notes MS Office Library tabs display incorrectly 7 331
Querying received e-mails from an agent 7 204
Lotus Domino 9.0 install on same pc with 8.5.3 9 129
Domino Server 2 71
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

911 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