Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to bring over field content

Posted on 2004-10-20
7
Medium Priority
?
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
7 Comments
 
LVL 19

Accepted Solution

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

2)
Did not understood.
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 100 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

705 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