Solved

How to bring over field content

Posted on 2004-10-20
7
196 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 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