Answers.Body: <p>You can use Smarty in Search kit using 'Rewrite text' and use the below snippet</p>
  <pre><code>{if [address_primary.country_id] neq 1228}
   [address_primary.country_id:label]
  {/if}
  </code></pre>
  <p>The above code will not display the Country name if it's not 1228(US). You will need to replace the 'address_primary.country_id' with actual token generated from the searckit.</p>
  <p>HTH</p>
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-22T09:00:37.897Z
Answers.LastActivityDate: 2024-03-22T09:00:37.897Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I'm exporting address data to a CSV file that will subsequently be used to produce postal mailing labels by a third party mailing house. I want to suppress the inclusion of the country name, but only for records where the country is not my local country.</p>
  <p>I've noted that the Fuzion Tokens extension can do this when, for example, producing mailing labels directly from Civi, but that's not my workflow.</p>
  <p>Feels like the sort of thing Searchkit should be able to do?</p>
  
Tags: <export><searchkit>
Title: In a data export how can I only include the country name if not the local country?
ThreadText: # In a data export how can I only include the country name if not the local country?
  
  (Asked by: username_0 on 2024-03-22)
  
  I'm exporting address data to a CSV file that will subsequently be used to produce postal mailing labels by a third party mailing house. I want to suppress the inclusion of the country name, but only for records where the country is not my local country.
  
  I've noted that the Fuzion Tokens extension can do this when, for example, producing mailing labels directly from Civi, but that's not my workflow.
  
  Feels like the sort of thing Searchkit should be able to do?
  
  **Tags:** export, searchkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-03-22. Score: 1
  
  You can use Smarty in Search kit using 'Rewrite text' and use the below snippet
  {if [address_primary.country_id] neq 1228}
   [address_primary.country_id:label]
  {/if}
  
  The above code will not display the Country name if it's not 1228(US). You will need to replace the 'address_primary.country_id' with actual token generated from the searckit.
  HTH
  Pradeep
  
  
  ---
  
  