Merging two files


#1

I have two files, one with one record of personal contact information and another with a list of records of possessions, both files sharing a unique ID per person.

How may I merge both files?


#2

Merging the files might be a pretty bad idea … but maybe I am misunderstanding what you want. Your setup with 2 databases containing one common ID field is ideal to keep the structures of the database files clean and simple. Whenever you need information from one of those databases in the other, you have the wide range of lookup( functions available. So you can e.g. display the possessions of one person in a form window of the Contacts database.


#3

I need to eventually export the final report to Excel where I would like to show the contact info of the person first and then right below the list of his/her possessions.


#4

To merge the files, be sure that one has extra fields to accomodate the data from the other. Then you would use the lookup( function as Kurt referred to. You’d use it with Morph in one of the extra fields after another to match the IDs and fill the field with the corresponding data.


#5

Morph is the Pan X nomenclature for formulafill / Manipulate Data in Field …


#6

Maybe you do not need to really import data from one db to the other. Maybe you can calculate all that “on the fly” with a formula as data argument to a filesave statement.


#7

I can do Lookups using the FormulaFill function in Panorama 6 but that would place all possessions in one record which would turn out to be too long and “messy” to read.

I don’t understand what you mean by " … a filesave statement."


#8

[quote=“Orlando, post:7, topic:1177, full:true”]
I can do Lookups using the FormulaFill function in Panorama 6 but that would place all possessions in one record which would turn out to be too long and “messy” to read. [/quote]

That was the reason why I recommended calculating your file export on the fly.

Some things can be done via menu items, but also procedurally. Statements are used in procedures.

Read about the filesave statement in the Pan 6 Help > Programmer’s Reference.
Also about the variations of the lookup( function, specially lookupall(.