Gossamer Forum
Home : Products : DBMan : Customization :

Adding information to a record from another record

Quote Reply
Adding information to a record from another record
I want to be able to enter a new record and be able to type in a name or ID# for one spot which would pull information from the record referenced and place into the current file when viewing.
Quote Reply
Re: [GCSHC] Adding information to a record from another record In reply to
It sounds like what you need is a relational database, where you would have two .db files. The contents of fields in one file would be available to the records of the other file. Is that what you want?

It would probably help if you were to give some more information about what you're wanting to do.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Adding information to a record from another record In reply to
I am looking for I have this record that has


Information 1

Information 2 - Information 2.1 - Information 2.2

Information 3 - Information 3.1 - Information 3.2

Where Information 2 would pick up certain fields that were entered into Information 2's own entry in the database, and Information 3 would pick up certain fields that were entered into Information 3's own entry into the database.

It's the same database just more passing the information into the next records data.
Quote Reply
Re: [GCSHC] Adding information to a record from another record In reply to
You can do this, but I don't think it's the best way to set up a database, if I understand what you're doing. I can't really tell, though, without more detail about your database.

For what you're wanting to do, you would need a field in each record that would hold the $db_key value for the other record. For illustration purposes, I'll call it other field. In sub html_record, you would add

%rec2=&get_record($rec{'other field'});

Then you can use the %rec2 hash the same way you use the %rec hash to print out the variables.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.