Assigning Aliases to Tables and Database Fields |
From the Database Setup dialog, you can assign an alias, or alternate name, to any table or database field. An alias lets you refer to the original table or database field, even if the document is set up to reference it by a different name. By assigning an alias for the table or field name, all references to the table or field will be maintained.
For example, suppose you designed a sample template for a customer, using your own database. The fields are:
"Name", "Address", "City", "State", "Zip"
The objects on your template are linked to these field names, as such:
Text 1 > Database.Name
Text 2 > Database.Address
Etc.
You send the sample template to your customer, and ask them to connect it to their own database. Their database contains the same information, but the field names are slightly different:
"Full Name", "Street", "City", "State"," Zip Code"
Simply deleting the database you created and adding the customer's new one won’t work, because all of the connected text objects will now point to field names that no longer exist. For example, Text 1 will still look for the field “Database.Name”, but the field is now called “Database.Full Name”.
Rather than changing each linked object to the new database field name, your customer can connect to their own database, then assign an alias consisting of the old database field name to each corresponding new database field.
"Full Name" would have an alias of "Name"
"Address" would have an alias of "Street"
"Zip" would have an alias of "Zip Code"
There would be no need to add an alias to the "City" or "State" fields, because they are the same in both databases.
When a template object looks for the database field it has been assigned to read from, it will "see" the alias and draw data from the correct field.
To assign an alias to a database field
Related Topics