How to alias a relationship

Create an alias for a relationship to identify the tags from that relationship in the field tagger.

Aliasing is available for most types of relationships and there are many different uses for aliases. This topic offers one example of how to use aliases, but you might come up with others.

A typical aliasing scenario

Let's say you want to isolate data from a particular field into different tables in your document. You have three different types of phone calls (Sales, Review, and Support) and you want a table of each type call to appear in your output documents. You could create three relationships, each with a filter for the type of call you want (Sale, Review, or Support) to add to your table. You would alias each relationship in the relationship editor so that you could identify the tags from that relationship and add them to the appropriate table in your template.

Relationships that you can alias

Relationship

Description

Salesforce Object Aliasing is optional, but aliases are only available for parent relationships (related lists). If you select a child relationship (lookup) in the Related By field, you can't alias the data.

Unrelated Data

Aliasing is optional.

Apex Data

Aliasing is optional.

SOQL Query

Aliasing is optional.

Create relationship aliases

First create three relationships that filter different types of calls, giving each relationship an alias.

To add aliases to relationships

  1. In a DocGen Package, on the Relationships related list, create three Salesforce Object relationships based on a related list with (Calls) with three different types of calls.

    For more information on Salesforce Object relationships, see Salesforce Object relationships.

    You can use any related list that has output that can be filtered; call types just matches the scenario described above to illustrate how one might use an alias.

  2. Filter each relationship so that it only provides data for a particular type of call (Sales, Review, and Support). For more information on filtering, see How to filter a relationship.

  3. Add an alias to the Relationship Alias field that corresponds to its filter (Sales, Review, and Support). So, for the relationship that filters only sales calls, you might use an alias of Sales and so forth.

Use aliased tags to create output documents

Create three tables set up for row replication in a template, using the tags from each of the aliases relationships to isolate filtered data for the table.

To create output documents from aliased tags

  1. In filed tagger, select one of the three aliases from Alias, and create a table using only the tags from one of the aliased relationships (Sales, Review, and Support).

    For more information on the field tagger, see Field Tagger.

  2. Create three row replication tables, using tags from one of the aliased relationships in each.

    For more information on row replication in Microsoft Word, see Row replication in Microsoft Word.

  3. Generate documents to see the output.

Related information

Field Tagger

Salesforce Object relationships

How to filter a relationship