115 pts.
 Merging Views (Notes)
I have two views that contain information from two separate forms. One is customer information and the other is customer contact information. I would like to create a new view that would show the contact information categorized below the customer information such as parent / child views.

Software/Hardware used:
ASKED: February 20, 2008  8:59 PM
UPDATED: February 21, 2008  3:18 PM

Answer Wiki:
There are a couple of ways to do this; one is to make the contact documents responses to the customer document; then you can use a regular hierarchical view. Otherwise, if you want the category to be the customer name, this would require the customer name to be stored in the contact documents as well as the customer documents. The view column formulas can only return values that are actually stored within a single document -- there are no "joins" like a relational database. I assume you also want the customer document to appear first, with the contacts beneath. There are several different ways to organize this sort of view, but in general, you would start out with a categorized column that returns the customer name. If you're smart, you'll use the same fieldname for this information on both forms, so that the column can just display this field. Otherwise, you'll have to do something like: @If(Form = "Customer"; Name; CustName) You will probably want to have the customer document appear first. This can be done in a couple of ways: one, you can use a hidden sorted column to the right of the categorized column, and sort by Form, descending (for instance). Or, if you would like the view to look like this: (twistie) Ferrous Industries Customer document (twistie) contacts Roland Ferrous 302-555-2020 then the category formula could be CustName + @If(Form = "Contact"; "\contacts"; "") Or, experiment with the hidden sorting column and "categorized is flat" option. Of course, other columns besides the categorized column might have to test the form to decide what fields to display there. This is one nice thing about the response documents option -- because you have a "responses only" column you can put what you like there and know what form it's coming from.
Last Wiki Answer Submitted:  February 21, 2008  3:18 pm  by  AGuirard   520 pts.
All Answer Wiki Contributors:  AGuirard   520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _