<?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: Increasing number field by 1 with Custom Code in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917474#M2094</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/526283"&gt;@ABrandt&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would a workflow like below support your needs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This workflow will enroll contacts every time the Marketing emails delivered property updates and they meet the filter requirements (e.g. contact is a member of a list). Then an action increases the Custom Marketing Emails Delivered property by one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this would not work, is there criteria than cannot be checked through enrollment filters or active list filters?&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-05 at 5.12.13 PM.png" style="width: 731px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/108774i38B9E56ED725D2C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-02-05 at 5.12.13 PM.png" alt="Screenshot 2024-02-05 at 5.12.13 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2024 22:20:01 GMT</pubDate>
    <dc:creator>JTBuys</dc:creator>
    <dc:date>2024-02-05T22:20:01Z</dc:date>
    <item>
      <title>Increasing number field by 1 with Custom Code</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917247#M2090</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm making a workaround in order to be able to count the number marketing emails delivered but after a certain condition/date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the native HubSpot field &lt;STRONG&gt;Number of marketing emails delivered&lt;/STRONG&gt; is a number field that can't be adjusted based on other criteria, I'm making a Workflow that adds +1 to a new custom property, every time the Number of marketing emails delivered change (as well as and other criteria are met)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the Workflow is updating a custom number field, what code could I have that will take the existing value and add 1 ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, its is 10 in the field, the workflow runs and update the custom field to 11.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 16:51:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917247#M2090</guid>
      <dc:creator>ABrandt</dc:creator>
      <dc:date>2024-02-05T16:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing number field by 1 with Custom Code</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917453#M2093</link>
      <description>&lt;P&gt;Hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/526283"&gt;@ABrandt&lt;/a&gt;&lt;/SPAN&gt;, Happy Monday!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can achieve this by using HubSpot's custom code within your workflow. &amp;nbsp;The code will fetch the current value of the custom field, add 1 to it, and then set the updated value back to the custom field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to invite our top experts to share their thoughts &lt;STRONG&gt;&lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/475927"&gt;@ArdenM&lt;/a&gt;&lt;/SPAN&gt;, &lt;/STRONG&gt;&lt;SPAN style="color:rgb(0,145,174);font-size:12px;"&gt;&lt;STRONG&gt;&lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/654259"&gt;@Jonas_De_Mets&lt;/a&gt;&lt;/SPAN&gt;, &lt;/STRONG&gt;&lt;/SPAN&gt;and &lt;SPAN style="color:rgb(0,145,174);font-size:12px;"&gt;&lt;STRONG&gt;&lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/445097"&gt;@JTBuys&lt;/a&gt;&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;any recommendations for&lt;SPAN style="color:rgb(0,145,174);font-size:12px;"&gt;&lt;STRONG&gt; &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/526283"&gt;@ABrandt&lt;/a&gt;&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;matter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Pam&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 21:53:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917453#M2093</guid>
      <dc:creator>PamCotton</dc:creator>
      <dc:date>2024-02-05T21:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing number field by 1 with Custom Code</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917474#M2094</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/526283"&gt;@ABrandt&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would a workflow like below support your needs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This workflow will enroll contacts every time the Marketing emails delivered property updates and they meet the filter requirements (e.g. contact is a member of a list). Then an action increases the Custom Marketing Emails Delivered property by one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this would not work, is there criteria than cannot be checked through enrollment filters or active list filters?&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-05 at 5.12.13 PM.png" style="width: 731px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/108774i38B9E56ED725D2C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-02-05 at 5.12.13 PM.png" alt="Screenshot 2024-02-05 at 5.12.13 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 22:20:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917474#M2094</guid>
      <dc:creator>JTBuys</dc:creator>
      <dc:date>2024-02-05T22:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing number field by 1 with Custom Code</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917961#M2098</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/445097"&gt;@JTBuys&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the suggestions. I did not realize there was an "&lt;STRONG&gt;Increase of decrease value&lt;/STRONG&gt;"&amp;nbsp; action.&lt;/P&gt;&lt;P&gt;Also, the way you have setup your triggers look much better than what I did. Thanks for the suggestions.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 16:00:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/917961#M2098</guid>
      <dc:creator>ABrandt</dc:creator>
      <dc:date>2024-02-06T16:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing number field by 1 with Custom Code</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/919607#M2103</link>
      <description>&lt;P&gt;Thanks for the tag &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/60427"&gt;@PamCotton&lt;/a&gt;! Fully agree with &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/445097"&gt;@JTBuys&lt;/a&gt; solution here, just wanted to add that even if you think you can do something in HubSpot Workflows with custom code, it's always better to look for a native solution using the workflow actions first. Custom code isn't highly supported, may break invisibly due to updates, and is harder for anyone that isn't you to maintain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glad the right solution was able to be surfaced here!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 18:33:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Increasing-number-field-by-1-with-Custom-Code/m-p/919607#M2103</guid>
      <dc:creator>ArdenM</dc:creator>
      <dc:date>2024-02-08T18:33:39Z</dc:date>
    </item>
  </channel>
</rss>

