No ratings

Drawloop - SOQL aggregate and toLabel fields in a DocGen Package


How to configure a SOQL query referencing aggregate and toLabel() fields with Drawloop DocGen


Additional Information

  • Drawloop will not populate a <<Tag>> in the Field Tagger for aggregate functions. The instructions below will provide you with the <<Tag>> logic/creation.
  • Most commonly used, toLabel().
  • The toLabel() field/function needs an Alias inside the SOQL.
  • The DocGen SOQL relationship will require a Relationship Alias as well.



In the below example, we will be using a Picklist Field where the API name is different than the display value.

Developer Console-001551.png

1. Add the tolabel() around the desired Salesforce field. Create an alias for the SOQL field.

example: "display"

Developer Console-001552.png

2. This will remove the value from showing in the developer console, but will still be queried in the DocGen Package as expected. 

3. Add this query to the DocGen Package and provide it with an Alias Relationship value.

example: "Translation"

Brent - AssureSign _ Salesforce-001553.png


4. The Tag logic will now be: <<RelationshipAlias_SoqlFieldAlias>>.

From the above choices:

  • RelationshipAliasTranslation
  • SoqlFieldAlias = display


Final output Tag =  <<Translation_Display>>

Related Links

Labels: (2)
Version history
Last update:
‎03-23-2022 06:25 AM
Updated by: