Solved

How to bring over field content

Posted on 2004-10-20
7
197 Views
Last Modified: 2013-12-18
Hi all,

I had 2 forms (eg. A & B) in a database and now in my B form, I'll like to show certain field's value (just 1 field) which is from A form inside B form.
Question 1
Pls advise what's the formula to use to search inside the DB for A form value and display inside B form?

Question 2 (just 1 of the field inside form A)
If my user had create many Form A by enter all different information in each form A and I will like to capture all the values (that is under only 1 field name) enter by different people inside form B, so that I can do some caculation. How should I do that?

Any kind help is greatly appreciated!

Rgds,
Eve
0
Comment
Question by:EvelynLoh
  • 2
7 Comments
 
LVL 19

Accepted Solution

by:
madheeswar earned 25 total points
ID: 12357415
1)
Use @DbLookup

2)
Did not understood.
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 25 total points
ID: 12358257
You need for the B document to have a "key" value form the A document.  Preferably, this key is the UNID (Universal ID, the document's replica ID), because you can then use @GetDocField, which is really, really fast, and doe snot require additional setup.  if you have a different value for key, then you need a view that contains only A documents sorted on this key value, then you use @DbLookup on the B form, with that view and the A key value.

Note I keep saying A document and B document, not A form and B form.  The form is just what you use to edit and program.  The document is what contains the field values,a dn what appears in view, and is what is being looke dup.  You use a form to start looking up, but what you are looking up is always a document, never a form.

Question 2 is really confusing, and you shoudl opena separate question, because even if your question was clear, this whole thread will get confusing as some comments are refering to question 1 and some refer to question 2.  It sounds as if you have many B documents for each A document.  As long as all the Bs contain the key from A, you can do the same @DbLookup technique I described earlier -- have a view containing only B documents, sorted on the "foreign key" (the B documents field value that is the key found originally in A).  the, in the A form, you can use @DbLookup against that view, with A's own key.

Note that in each case, you need to use @IsError to check the result, because sometimes, @DbLookup will not be able to find a match, and will return an error value, which can really mess things up.  Here is a typical formula:

view := "name of view";
key := field_name_that_servers_as_key;
column := 12345; "The column number of the view that contains the value you want to retrieve -- not the key column";
result := @DbLookup(""; ""; view; key; column);
@If(@IsError(result); "Could not retrieve " + @Text(key) + " value from view " + view + ": " + @Text(result); result)
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12359572
something useful for you in my comments to question --> http://Q_21167331.html
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12359584
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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