Output Related Files in Separate Tables for Each Filter Criteria

Output related files in separate tables for each filter criteria.

*This feature is available in Office File Creator Pro.

 

Overview

Examples of Use

  • Output a list of related files related to Account, separated by file format.

 

Required settings

  • Merge Fields Settings
  • OFC_Child Object Option Record Settings

 

 

Determine Child Relationship Name

Determine the child relationship name used to link the merge fields to the OFC_Child Object Option record.

Naming Rules for Child Relation Name

Set either (any name)ContentDocument or (any name)Attachment. Parentheses begin with a Roman numeral and only alphanumeric characters and underscores are allowed.

 

Examples of child relationship names

(doc)ContentDocument

(image)ContentDocument

 

 

Merge Fields Settings

Set the merge field in the template file in the form of {!ChildRelationName.Field API Name}.

Example: Outputs a list of related files of the master object in two tables

Table 1: {!(doc)ContentDocument.Title}

Table 2: {!(image)ContentDocument.Title}

 

 

OFC_Child Object Option Record Settings

Create OFC_Child Object option records for the number of tables to be separated by the filter criteria.

Reference: Create OFC_Child Object Option Record

 

Information

Name: Enter any name. e.g. Files (Document)

Child Relationship Name: Enter the child relationship name. e.g. (doc)ContentDocument

 

 

(Pro) Filter Criteria (ContentDocument/Attachment)

(File) FilterCriteria Field API Name: Enter the field API name for filtering ContentDocument or Attachment records.

(File) FilterCriteria Operator: Select the operator for filtering records.

(File) FilterCriteria Value: Enter the value for filtering records.

 

 

(Pro) Advanced Relationship Settings

Object API Name: For files related to a master object, enter the object API name of the master object. For files related to  child objects, enter the object API name of the child object.

Master Object Id Field API Name: For files related to a master object, enter "Id". For files related to child objects, enter the look-up filed API name of the master object. For the third level and beyond, enter a cross-object formula that references the Id of the master object.

 

Example of files related to a master object: The master object is Account and files related to the Account

Object API Name: Account

Master Object Id Field API Name: Id

 

Example of files related to a two-level child record: The master object is Account and files related to the Opportunity related to the Account.

Object API Name: Opportunity

Master Object Id Field API Name: AccountId

 

Example of files related to a third-level child record: The master object is Account and files related to the third-level Case (Account > Opportunity > Case).

Object API Name: Case

Master Object Id Field API Name: Opportunity__r.AccountId