<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Association Labels inside Hubl markup in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Association-Labels-inside-Hubl-markup/m-p/984388#M74040</link>
    <description>&lt;P&gt;Thank you Teun, I managed to get it working with your answer above. Much appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2024 08:06:43 GMT</pubDate>
    <dc:creator>MartinN7</dc:creator>
    <dc:date>2024-05-30T08:06:43Z</dc:date>
    <item>
      <title>Association Labels inside Hubl markup</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Association-Labels-inside-Hubl-markup/m-p/983003#M73966</link>
      <description>&lt;P&gt;Hi support, I'd like to know if I'm able to read association labels inside the hubl markup. I have the following scenario,&lt;BR /&gt;&lt;BR /&gt;I've created a custom crm object named "Events" to which users in the CRM get associated. When creating the association I also add a label for example "Invited - accepted" or "Invited - declined". I would like to use these labels to do some logical flow inside the hubl template...&lt;BR /&gt;&lt;BR /&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 10:00:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Association-Labels-inside-Hubl-markup/m-p/983003#M73966</guid>
      <dc:creator>MartinN7</dc:creator>
      <dc:date>2024-05-28T10:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Association Labels inside Hubl markup</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Association-Labels-inside-Hubl-markup/m-p/983026#M73968</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/768593"&gt;@MartinN7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#crm-associations" target="_blank" rel="noopener"&gt;crm_associations&lt;/A&gt; function to retrieve the associated 'events' of your contact. In this HubL function, you need to pass the association type ID and category, which means you can easily retrieve all&amp;nbsp; events with a specific label. In this case, it's probably the easiest to retrieve the associated records per label:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set accepted = crm_associations(&amp;lt;contactID&amp;gt;, 'USER_DEFINED', &amp;lt;assocationTypeID&amp;gt;, 'property1,property2', false) %}
{% set declined = crm_associations(&amp;lt;contactID&amp;gt;, 'USER_DEFINED', &amp;lt;assocationTypeID&amp;gt;, 'property1,property2', false) %}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;The association type ID can be found in the &lt;A href="https://developers.hubspot.com/docs/cms/features/custom-objects#getting-a-custom-object-type-s-details" target="_blank" rel="noopener"&gt;CRM Objects Schema API&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 10:29:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Association-Labels-inside-Hubl-markup/m-p/983026#M73968</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2024-05-28T10:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Association Labels inside Hubl markup</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Association-Labels-inside-Hubl-markup/m-p/984388#M74040</link>
      <description>&lt;P&gt;Thank you Teun, I managed to get it working with your answer above. Much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 08:06:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Association-Labels-inside-Hubl-markup/m-p/984388#M74040</guid>
      <dc:creator>MartinN7</dc:creator>
      <dc:date>2024-05-30T08:06:43Z</dc:date>
    </item>
  </channel>
</rss>

