Body: <p>As a workflow message for a contribution confirmation, i use the following template. All values are displayed, except $financial_type_id and $source. Both stay empty in the output table. How come only those two are not displayed, while the others are? When I use total_amount (a database field) instead of amount (not a database field), the output is also empty.</p>
  
  <pre><code>{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
  {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
  {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
  
      &lt;table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;"&gt;
      &lt;tr&gt;&lt;th {$headerStyle}&gt;
          Detail Contribution
      &lt;/th&gt;&lt;/tr&gt;
      &lt;tr&gt;
          &lt;td {$labelStyle}&gt;{ts}Financial type{/ts}&lt;/td&gt;
          &lt;td {$valueStyle}&gt;{$financial_type_id}&lt;/td&gt; &lt;!-- IS EMPTY --&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td {$labelStyle}&gt;{ts}Total Amount{/ts}&lt;/td&gt;
          &lt;td {$valueStyle}&gt;{$amount|crmMoney:$currency}&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td {$labelStyle}&gt;Year&lt;/td&gt;
          &lt;td {$valueStyle}&gt;{$source}&lt;/td&gt; &lt;!-- IS EMPTY --&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td {$labelStyle}&gt;{ts}Receive Date{/ts}&lt;/td&gt;
          &lt;td {$valueStyle}&gt;{$receive_date|truncate:10:''|crmDate}&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td {$labelStyle}&gt;{ts}Receipt Date{/ts}&lt;/td&gt;
          &lt;td {$valueStyle}&gt;{$receipt_date|truncate:10:''|crmDate}&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td {$labelStyle}&gt;{ts}Transaction #{/ts}&lt;/td&gt;
          &lt;td {$valueStyle}&gt;{$trxn_id}&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/table&gt;
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-16T17:11:09.167Z
Comments.Text: Try prefixing the blank ones with contribution, e.g. $contribution.financial_type_id
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-16T21:16:57.887Z
Comments.Text: @Dement. Thanks for the suggestion. Adding "contribution" as you suggested, did not help. The values stay empty.
Comments.UserDisplayName: MarkDQ
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-16T21:42:30.237Z
Comments.Text: This question seems similar? https://civicrm.stackexchange.com/questions/8905/is-there-a-token-for-contribution-type. Maybe without the $ or see the part about formValues.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-16T22:46:03.100Z
Comments.Text: @Demert. All the suggestions did not work. {$formValues.xxx} is for the offline confirmation (based on a form). The online version is the template used with a query (for instance, the n latest imported contributions),and is no form. I tried the different names {$contribution.xxx}, {contribution.xxx} where xxx = "financial_type" or  "financial_type_id". Also {financial_type_id} without $. Same problem with "source" or "paidBy".
Comments.UserDisplayName: MarkDQ
Tags: <civicontribute><smarty><system-workflow-messages>
Title: Smarty does not display database fields
ThreadText: # Smarty does not display database fields
  
  (Asked by: username_0 on 2019-02-15)
  
  As a workflow message for a contribution confirmation, i use the following template. All values are displayed, except $financial_type_id and $source. Both stay empty in the output table. How come only those two are not displayed, while the others are? When I use total_amount (a database field) instead of amount (not a database field), the output is also empty.
  {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
  {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
  {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
  
      
      
          Detail Contribution
      
      
          {ts}Financial type{/ts}
          {$financial_type_id} 
      
      
          {ts}Total Amount{/ts}
          {$amount|crmMoney:$currency}
      
      
          Year
          {$source} 
      
      
          {ts}Receive Date{/ts}
          {$receive_date|truncate:10:''|crmDate}
      
      
          {ts}Receipt Date{/ts}
          {$receipt_date|truncate:10:''|crmDate}
      
      
          {ts}Transaction #{/ts}
          {$trxn_id}
  
  **Tags:** civicontribute, smarty, system-workflow-messages
  
  > **Comments:**
  > **username_1**: Try prefixing the blank ones with contribution, e.g. $contribution.financial_type_id  
  > **username_0**: @Dement. Thanks for the suggestion. Adding "contribution" as you suggested, did not help. The values stay empty.  
  > **username_1**: This question seems similar? https://civicrm.stackexchange.com/questions/8905/is-there-a-token-for-contribution-type. Maybe without the $ or see the part about formValues.  
  > **username_0**: @Demert. All the suggestions did not work. {$formValues.xxx} is for the offline confirmation (based on a form). The online version is the template used with a query (for instance, the n latest imported contributions),and is no form. I tried the different names {$contribution.xxx}, {contribution.xxx} where xxx = "financial_type" or  "financial_type_id". Also {financial_type_id} without $. Same problem with "source" or "paidBy".  
  
  ---
  
  ## 0 answers
  
  