How to create cross-reference indexes

How can I create cross-reference indexes?

With CatBase it's easy to create an index: you simply select the Index this Element option in the Preferences tab for the Element you want to build an index on (e.g. Company Name, Last Name, ID Number, etc.).Then, after you have published your data, you can use the publishing destination's built-in index-building feature to create your index. But what if you want a more complex index? For example, in addition (or instead of) creating a simple index of company names, or last names, or whatever, you want to create an index by category, or by country, or by county, etc. Maybe even multiple indexes by different criteria. The process is quite easy with CatBase:
  1. When you set up your Publishing Style Sheet, index a unique field. The best field to use for this is the RecordNumber, as that is guaranteed to always be unique. You can use another field - such as Company Name - if you're confident that all company names are unique within the database
  2. If you don't want the indexed field to be printed in the publication, create a Character Style called "hidden" or something like that, and apply it to the indexed Element (on the Element's Preferences page, select your "Hidden" Character Style from the Character Style popup menu)
  3. If the indexed field is a numeric field, such as the RecordNumber, select the Number Format button on the Element Preferences page and make sure that the number style is plain with no decimals places and no monetary unit
  4. Publish the data
  5. In your layout (Quark, InDesign, Word etc.) modify the Hidden character style - make it very tiny, perhaps with very tight tracking, and give it no colour or "paper" colour)
  6. Finalise the layout and save it
  7. Build the index. You just want a simple index that includes the indexed item (company name, record number, etc.), followed by a Tab, followed by the page number(s). You don't want any headings; if it creates them, delete them.
  8. Save the index as a plain text file
  9. It is a good idea to check the text file. Open it up in a text editor or word processor, or a text box in your page layout program, and check that it's in the correct format: plain text; one entry per line containing the index key, a tab, and the page number(s)
Next, you will import that text file back into CatBase and use it to update a Page Number field in the database. Once you have the page numbers in the database, you'll be able to create all the indexes you want. If you are not confident about this step, it might be a good idea to make a backup of your database before proceeding (that's the file with the .4dd file extension).
  1. You'll need to have a Page Numbers field in your database. Let's say your table is called Companies. If you don't already have a Page Numbers field in the Companies table, create one. It will need to be a String type field.
  2. Create a new Import Style. Give it a name and select the Companies table from the Import into Table popup menu.
  3. Click on the Select button, locate your index text file, and double-click on it
  4. Map the two fields: the first field will be your "key" field such as the RecordNumber of Company Name, and the second field will be your Page Number field
  5. Go to the Updates tab
  6. Select the third radio button: Update existing records
  7. Your key field will probably be selected in the Primary Key Field popup. Make sure that it is.
  8. Go back to the Main tab
  9. Click the Import Now button
  10. Your data will be imported. When it's done, open a record to check that the page number(s) have been imported.
Finally, publish your cross-ref index(es).
  1. Create a new Publishing Style Sheet
  2. Add a Paragraph and choose a suitable Paragraph Style for it
  3. Add the Elements you need - e.g. Company Name, a Tab, and the Page Numbers
  4. Go to the Prefs tab and choose the sort order
  5. Save it
You're now ready to publish the index! You can build any number of indexes this way, sorted by Category or whatever.

Go to CatBase.com