Solved

How to bring over field content

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

708 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

16 Experts available now in Live!

Get 1:1 Help Now