<?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: Custom code Make contact property input fields from a form submission to search in company prope in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/854690#M1804</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/368725"&gt;@Isabel_c&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not a developer (aspiring one though &lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪🏻&lt;/span&gt;) so I did some GPT-4 and here's what I got.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Trigger Workflow&lt;/STRONG&gt;&lt;SPAN&gt;: Trigger the workflow when a form is submitted that updates the &lt;/SPAN&gt;&lt;CODE&gt;shop_number&lt;/CODE&gt;&lt;SPAN&gt; property for a contact.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({ apiKey: 'YOUR_HUBSPOT_API_KEY' });

exports.main = (event, callback) =&amp;gt; {
  const contactShopNumber = event.object.properties.shop_number;

  hubspotClient.crm.companies.searchApi.doSearch({
    filterGroups: [{
      filters: [{
        propertyName: 'shop_number',
        operator: 'EQ',
        value: contactShopNumber
      }]
    }]
  }).then(results =&amp;gt; {
    const isMatch = results.body.total &amp;gt; 0;
    callback({ output: { isMatch } });
  }).catch(err =&amp;gt; {
    console.error(err);
    callback({ output: { isMatch: false } });
  });
};
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can further, diagnose your own code with GPT and get some movement while you wait for a developer's response.&lt;BR /&gt;&lt;BR /&gt;Also, I recommend posting this on the&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/HubSpot-Developers/ct-p/developers" target="_blank" rel="noopener"&gt;developer discussion&lt;/A&gt; for better visibility.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2023 09:45:55 GMT</pubDate>
    <dc:creator>Shadab_Khan</dc:creator>
    <dc:date>2023-09-25T09:45:55Z</dc:date>
    <item>
      <title>Custom code Make contact property input fields from a form submission to search in company property</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/854486#M1803</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been dealing with this problem for 2days already and all my codes did not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a visitor makes a form submission, it will fill up a contact property called "shop_number" as a single line text. And;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;because it is a single line text, I can't use the filtering because I will have to input all 7000 values which copy and pasting does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a custom code, we want this input fields to search on company property, also called, "shop_number" to filter the response if matched to any of all the companies in the crm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example: A visitor submitted '12340' in the contact shop number, then the workflow should be able to check if that matches any of the company shop number. The answer must be boolean.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hoping for someone's help please&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 13:52:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/854486#M1803</guid>
      <dc:creator>Isabel_c</dc:creator>
      <dc:date>2023-09-25T13:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom code Make contact property input fields from a form submission to search in company prope</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/854690#M1804</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/368725"&gt;@Isabel_c&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not a developer (aspiring one though &lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪🏻&lt;/span&gt;) so I did some GPT-4 and here's what I got.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Trigger Workflow&lt;/STRONG&gt;&lt;SPAN&gt;: Trigger the workflow when a form is submitted that updates the &lt;/SPAN&gt;&lt;CODE&gt;shop_number&lt;/CODE&gt;&lt;SPAN&gt; property for a contact.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({ apiKey: 'YOUR_HUBSPOT_API_KEY' });

exports.main = (event, callback) =&amp;gt; {
  const contactShopNumber = event.object.properties.shop_number;

  hubspotClient.crm.companies.searchApi.doSearch({
    filterGroups: [{
      filters: [{
        propertyName: 'shop_number',
        operator: 'EQ',
        value: contactShopNumber
      }]
    }]
  }).then(results =&amp;gt; {
    const isMatch = results.body.total &amp;gt; 0;
    callback({ output: { isMatch } });
  }).catch(err =&amp;gt; {
    console.error(err);
    callback({ output: { isMatch: false } });
  });
};
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can further, diagnose your own code with GPT and get some movement while you wait for a developer's response.&lt;BR /&gt;&lt;BR /&gt;Also, I recommend posting this on the&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/HubSpot-Developers/ct-p/developers" target="_blank" rel="noopener"&gt;developer discussion&lt;/A&gt; for better visibility.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 09:45:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/854690#M1804</guid>
      <dc:creator>Shadab_Khan</dc:creator>
      <dc:date>2023-09-25T09:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom code Make contact property input fields from a form submission to search in company prope</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/854869#M1805</link>
      <description>&lt;P&gt;I tried the code but it did not work on my end. Thanks though&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 15:24:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/854869#M1805</guid>
      <dc:creator>Isabel_c</dc:creator>
      <dc:date>2023-09-25T15:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Custom code Make contact property input fields from a form submission to search in company prope</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/855504#M1809</link>
      <description>&lt;P&gt;closing this&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 14:57:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-code-Make-contact-property-input-fields-from-a-form/m-p/855504#M1809</guid>
      <dc:creator>Isabel_c</dc:creator>
      <dc:date>2023-09-26T14:57:34Z</dc:date>
    </item>
  </channel>
</rss>

