<?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>question Re: Getting error &amp;quot;Cannot read property &amp;quot;length&amp;quot; from undefined&amp;quot; in flow designe in ServiceNow AI Platform forum</title>
    <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/2350260#M185751</link>
    <description>&lt;P&gt;The issue was with the payload value I was trying to send to JIRA, the issue type value (Example Story, Epic etc.,) which Jira expected was not sent in the payload. Also, it's case sensitive.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 08:04:18 GMT</pubDate>
    <dc:creator>mit2324</dc:creator>
    <dc:date>2022-10-13T08:04:18Z</dc:date>
    <item>
      <title>Getting error "Cannot read property "length" from undefined" in flow designer.</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173184#M129573</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I am trying for SNow - JIRA integration using JIRA spoke. Getting error "&lt;STRONG&gt;Cannot read property "length" from undefined&lt;/STRONG&gt;". I haven't used length anywhere in the script. Below is the script I have used in subflow, which is getting me the payload. The same script is running in background script, but getting error when I test run the flow.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;try{&lt;/DIV&gt;
&lt;DIV&gt;var issue_type = fd_data.subflow_inputs.template.u_issue_type.toString();&lt;/DIV&gt;
&lt;DIV&gt;var payload_template = gs.getProperty('jira.'+ issue_type);&lt;/DIV&gt;
&lt;DIV&gt;var json_val = JSON.parse(payload_template);&lt;/DIV&gt;
&lt;DIV&gt;var payload = {};&lt;/DIV&gt;
&lt;DIV&gt;if(json_val !=''){&lt;/DIV&gt;
&lt;DIV&gt;for(var key in json_val)&lt;/DIV&gt;
&lt;DIV&gt;{&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;payload[key] = fd_data.subflow_inputs.task[json_val[key]].getDisplayValue().toString();&lt;/DIV&gt;
&lt;DIV&gt;gs.info("Jira_pload: "+ payload);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;} }&lt;/DIV&gt;
&lt;DIV&gt;return JSON.stringify(payload);&lt;/DIV&gt;
&lt;DIV&gt;}&lt;/DIV&gt;
&lt;DIV&gt;catch (e)&lt;/DIV&gt;
&lt;DIV&gt;{&lt;/DIV&gt;
&lt;DIV&gt;return e;&lt;/DIV&gt;
&lt;DIV&gt;}&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Please let me know what could be done to fix the issue. Thanks in advance,&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mithun&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 15:30:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173184#M129573</guid>
      <dc:creator>mit2324</dc:creator>
      <dc:date>2022-09-20T15:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error "Cannot read property "length" from undefined" in flow designer.</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173185#M129574</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Take a look at -&amp;nbsp;&lt;A title=" Error &amp;quot;Cannot read property length from undefined&amp;quot; in my custom workflow activity 'Create PDL'., whenever catalog item goes through the workflow. " href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=e6ba5bbadbf6b3442be0a851ca96196e" target="_blank" rel="noopener"&gt; Error "Cannot read property length from undefined" in my custom workflow activity 'Create PDL'., whenever catalog item goes through the workflow. &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Thanks,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sagar Pagar&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 15:45:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173185#M129574</guid>
      <dc:creator>Sagar Pagar</dc:creator>
      <dc:date>2022-09-20T15:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error "Cannot read property "length" from undefined" in flow designer.</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173186#M129575</link>
      <description>&lt;P&gt;Mithun,&lt;/P&gt;
&lt;P&gt;At a guess, your issue lies in your for loop. I would debug inside the loop what the json_val[key] is and ensure that it exists in the variable you are expecting to retrieve it from.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 11:46:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173186#M129575</guid>
      <dc:creator>Richard Hine</dc:creator>
      <dc:date>2022-09-22T11:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error "Cannot read property "length" from undefined" in flow designer.</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173187#M129576</link>
      <description>&lt;P class="p1"&gt;Hi mit&lt;/P&gt;
&lt;P class="p1"&gt;I'm working as a pre-sales engineer with&amp;nbsp;&lt;A href="https://marketplace.atlassian.com/search?query=issue%20sync"&gt;&lt;SPAN class="s1"&gt;Exalate&lt;/SPAN&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P class="p1"&gt;Exalate was designed with exactly these types of use-cases in mind, you could say that it is our "bread and butter".&lt;/P&gt;
&lt;P class="p1"&gt;One of Exalate's features, apart from syncing tickets bi-directionally, is having access to a script connection type, where the sky is truly the limit and your use-case will be solved by.&lt;/P&gt;
&lt;P class="p1"&gt;Any entity type will out-of-the-box be fully bi-directionally syncronized, which means, if a field gets updated on either side, it will automatically update on the other side, you can change this to make it uni-directional if you so please.&lt;/P&gt;
&lt;P class="p1"&gt;Exalate is easy and straightforward to set-up and you can control exactly which data you want to send and/or receive.&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;If you would like to see a&amp;nbsp;&lt;A href="https://exalate.com/book-demo/"&gt;&lt;SPAN class="s1"&gt;customized demo&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;of the product, please book a slot.&lt;/P&gt;
&lt;P class="p1"&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 04:14:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/1173187#M129576</guid>
      <dc:creator>Mathieu Lepoutr</dc:creator>
      <dc:date>2022-09-23T04:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error "Cannot read property "length" from undefined" in flow designe</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/2350260#M185751</link>
      <description>&lt;P&gt;The issue was with the payload value I was trying to send to JIRA, the issue type value (Example Story, Epic etc.,) which Jira expected was not sent in the payload. Also, it's case sensitive.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 08:04:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/getting-error-quot-cannot-read-property-quot-length-quot-from/m-p/2350260#M185751</guid>
      <dc:creator>mit2324</dc:creator>
      <dc:date>2022-10-13T08:04:18Z</dc:date>
    </item>
  </channel>
</rss>

