<?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 based on First &amp;amp;amp; Most Recent in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/Association-Labels-based-on-First-amp-amp-Most-Recent/m-p/1173042#M3140</link>
    <description>&lt;P class="whitespace-normal break-words"&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/846441"&gt;@Andreas11&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P class="whitespace-normal break-words"&gt;Thank you for reaching out to the Community!&lt;/P&gt;
&lt;P class="whitespace-normal break-words"&gt;I'd like to invite some community members who are subject matter experts to join this conversation.&lt;/P&gt;
&lt;P class="whitespace-normal break-words"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/262080"&gt;@DavidVoigt&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/111325"&gt;@karstenkoehler&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/654259"&gt;@Jonas_De_Mets&lt;/a&gt;&amp;nbsp;- Would you be able to share any insights on this? Your expertise would be greatly appreciated.&lt;/P&gt;
&lt;P class="whitespace-pre-wrap break-words"&gt;Best regards,&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jul 2025 21:41:22 GMT</pubDate>
    <dc:creator>Victor_Becerra</dc:creator>
    <dc:date>2025-07-04T21:41:22Z</dc:date>
    <item>
      <title>Association Labels based on First &amp;amp; Most Recent</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Association-Labels-based-on-First-amp-amp-Most-Recent/m-p/1172958#M3139</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a company based workflow which applies and updates "&lt;STRONG&gt;&lt;EM&gt;Most Recent&lt;/EM&gt;&lt;/STRONG&gt;" or "&lt;STRONG&gt;&lt;EM&gt;First&lt;/EM&gt;&lt;/STRONG&gt;" association labels to associated records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The associated records live within a custom object, and they're already associated through a indentifer key - but they're misssing labels.&lt;BR /&gt;&lt;BR /&gt;We have a bunch of historical records, so it's not enough to set labels for whenever something new comes it. We have to set labels on the old ones as well.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There's a date property on each associated record which we can use to "calculate" the order. I'm unable to write code myself so I've tried prompting chatgpt in various ways including this property, but I haven't managed to solve it.&lt;BR /&gt;&lt;BR /&gt;As an example, this is the output I'd like to achieve:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="476px" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL width="100" /&gt;&lt;COL width="104" /&gt;&lt;COL width="100" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="190.797px" height="30px"&gt;&lt;STRONG&gt;Associated Record ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="119.5px" height="30px"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="164.703px" height="30px"&gt;&lt;STRONG&gt;Association Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="190.797px" height="30px"&gt;1&lt;/TD&gt;&lt;TD width="119.5px" height="30px"&gt;2025-01-01&lt;/TD&gt;&lt;TD width="164.703px" height="30px"&gt;First&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="190.797px" height="30px"&gt;2&lt;/TD&gt;&lt;TD width="119.5px" height="30px"&gt;2025-02-01&lt;/TD&gt;&lt;TD width="164.703px" height="30px"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="190.797px" height="30px"&gt;3&lt;/TD&gt;&lt;TD width="119.5px" height="30px"&gt;2025-03-01&lt;/TD&gt;&lt;TD width="164.703px" height="30px"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="190.797px" height="30px"&gt;4&lt;/TD&gt;&lt;TD width="119.5px" height="30px"&gt;2025-04-01&lt;/TD&gt;&lt;TD width="164.703px" height="30px"&gt;Most Recent&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If new associated record comes in:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="478px" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL width="100" /&gt;&lt;COL width="104" /&gt;&lt;COL width="100" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="192px" height="30px"&gt;&lt;STRONG&gt;Associated Record ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="119px" height="30px"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="166px" height="30px"&gt;&lt;STRONG&gt;Association Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="192px" height="30px"&gt;1&lt;/TD&gt;&lt;TD width="119px" height="30px"&gt;2025-01-01&lt;/TD&gt;&lt;TD width="166px" height="30px"&gt;First&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="192px" height="30px"&gt;2&lt;/TD&gt;&lt;TD width="119px" height="30px"&gt;2025-02-01&lt;/TD&gt;&lt;TD width="166px" height="30px"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="192px" height="30px"&gt;3&lt;/TD&gt;&lt;TD width="119px" height="30px"&gt;2025-03-01&lt;/TD&gt;&lt;TD width="166px" height="30px"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="192px" height="30px"&gt;4&lt;/TD&gt;&lt;TD width="119px" height="30px"&gt;2025-04-01&lt;/TD&gt;&lt;TD width="166px" height="30px"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="192px" height="30px"&gt;5&lt;/TD&gt;&lt;TD width="119px" height="30px"&gt;2025-05-01&lt;/TD&gt;&lt;TD width="166px" height="30px"&gt;Most Recent&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would love some guidence or suggestions on any way to achieve this.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2025 13:42:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Association-Labels-based-on-First-amp-amp-Most-Recent/m-p/1172958#M3139</guid>
      <dc:creator>Andreas11</dc:creator>
      <dc:date>2025-07-04T13:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Association Labels based on First &amp;amp; Most Recent</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Association-Labels-based-on-First-amp-amp-Most-Recent/m-p/1173042#M3140</link>
      <description>&lt;P class="whitespace-normal break-words"&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/846441"&gt;@Andreas11&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P class="whitespace-normal break-words"&gt;Thank you for reaching out to the Community!&lt;/P&gt;
&lt;P class="whitespace-normal break-words"&gt;I'd like to invite some community members who are subject matter experts to join this conversation.&lt;/P&gt;
&lt;P class="whitespace-normal break-words"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/262080"&gt;@DavidVoigt&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/111325"&gt;@karstenkoehler&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/654259"&gt;@Jonas_De_Mets&lt;/a&gt;&amp;nbsp;- Would you be able to share any insights on this? Your expertise would be greatly appreciated.&lt;/P&gt;
&lt;P class="whitespace-pre-wrap break-words"&gt;Best regards,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2025 21:41:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Association-Labels-based-on-First-amp-amp-Most-Recent/m-p/1173042#M3140</guid>
      <dc:creator>Victor_Becerra</dc:creator>
      <dc:date>2025-07-04T21:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Association Labels based on First &amp;amp; Most Recent</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Association-Labels-based-on-First-amp-amp-Most-Recent/m-p/1173468#M3142</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;if it's a company based workflow, then enrollment could be based on each time the number of associated custom objects change.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If an object assiociation has been removed, you may need to relabel the remaining ones.&lt;BR /&gt;If one has been added, same. Because you'll never know, what if the first associated object has been deleted - then the next best one would take its place.&lt;BR /&gt;&lt;BR /&gt;Then, I would probably remove both association labels,&lt;BR /&gt;and re-label the associated objects.&lt;BR /&gt;&lt;BR /&gt;So, for the workflow code: &lt;BR /&gt;1. get all the associated objects with id and their sort date property into a dictionary&lt;BR /&gt;2. clear their association labels to the company object&lt;BR /&gt;3. return the ids of the one with the oldest and newes date property&lt;BR /&gt;4 apply the new labels.&lt;BR /&gt;&lt;BR /&gt;Btw what do you want to happen if there's only one associated object? Because that would be the first and the most recent at the same time. Do you want to apply both labels?&lt;BR /&gt;For better advice, could you maybe disclose what's the business problem this labelling is going to solve?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 07:12:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Association-Labels-based-on-First-amp-amp-Most-Recent/m-p/1173468#M3142</guid>
      <dc:creator>DavidVoigt</dc:creator>
      <dc:date>2025-07-07T07:12:24Z</dc:date>
    </item>
  </channel>
</rss>

