Skip to main content

Topic

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.

 

Instructions

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

21189iD9E1354860903FE8.png

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

example: "display"

21190iE14DD2749730292E.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"

21192i5843808A3A9C1D85.png

 

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

From the above choices:

  • RelationshipAliasTranslation
  • SoqlFieldAlias = display

 

Final output Tag =  <<Translation_Display>>

Related Links

Be the first to reply!

Reply