<?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: Array Issue in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849046#M10719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I’m passing the corridor and the offset in as the x/y coordinate..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Sep 2015 13:25:41 GMT</pubDate>
    <dc:creator>TerryGustafson</dc:creator>
    <dc:date>2015-09-16T13:25:41Z</dc:date>
    <item>
      <title>Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849035#M10708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a novice at js.&amp;nbsp; have the following js code I'm have an issue with.&amp;nbsp; I get the following error "Unable to get property 'toFixed' of undefined or null reference"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code. I was trying to add line 13 to return a second set of results from the LRM_DC_RM_MI1 table.&amp;nbsp; When I add break points through the console it appears to return the correct values.&amp;nbsp; Any idea what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;function&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (jobInfo) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.gp.getResultData(jobInfo.jobId, &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"LRM_DR1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, lang.hitch(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.renderResult));&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.gp.getResultData(jobInfo.jobId, &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"LRM_DC_RM_MI1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, lang.hitch(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.renderResult));&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;function&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (result) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.shelter.hide();&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; resultArray = result.value.features;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; resultString = &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;table class="test"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Route&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Accumulated Mileage&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (resultArray.length &amp;gt; 0) {&lt;/SPAN&gt;

&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;//loop through and populate table&lt;/SPAN&gt;
&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;
&lt;/SPAN&gt;
&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;for&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; i = 0; i &amp;lt; resultArray.length; i++) {&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; + resultArray&lt;I&gt;.attributes.RID + &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; + resultArray&lt;I&gt;.attributes.MEAS.toFixed(3) + &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; + resultArray&lt;I&gt;.attributes.ROUTE + &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; + resultArray&lt;I&gt;.attributes.OFFSETtoFixed(3) + &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/table&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;else&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; {&lt;/SPAN&gt;

&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;//Return No results message&lt;/SPAN&gt;
&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;
&lt;/SPAN&gt;
&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"No result Returned please click on Route"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:26:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849035#M10708</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2021-12-12T10:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849036#M10709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Terry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line 22 thru 26 looks suspicious. You are writing some strings but never setting then to any var, so they are worthless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then line 24&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + resultArray&lt;I&gt;.attributes.ROUTE + '&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + resultArray&lt;I&gt;.attributes.OFFSETtoFixed(3) + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/I&gt;&lt;/I&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^MISSING DOT&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:26:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849036#M10709</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849037#M10710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well I added line 05 to pull in the reference Marker information from the gp service.&amp;nbsp; Then I added line 24 with the attributes from the LRM_DC_RM_MI1 table.&amp;nbsp; Before I added those 2 lines I had it working and would return the following result.&amp;nbsp; I was wanting to return the RM information as well.&amp;nbsp; I guess I could do another array and table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 20:39:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849037#M10710</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-09-10T20:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849038#M10711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Terry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You are trying to have both getResultData use the same renderResult function?.. How are you differentiating between the results? Both result don't have the same fields do they...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not make much sense of the posted code can you attach your widget?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 20:47:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849038#M10711</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-09-10T20:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849039#M10712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I commented out lines 162 and 178 that I added.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 20:54:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849039#M10712</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-09-10T20:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849040#M10713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use f12 to get the browser debug tools.&amp;nbsp; Find the Debug tab and put a breakpoint in before your problem. You can step to the offending line and mouse-over to inspect. This is more or less the same in all the major browsers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use the term &lt;EM&gt;&lt;STRONG&gt;debugger; &lt;/STRONG&gt;&lt;/EM&gt;in your code to force a breakpoint. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 13:40:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849040#M10713</guid>
      <dc:creator>JoshHevenor</dc:creator>
      <dc:date>2015-09-11T13:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849041#M10714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Terry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here is your widget back with comments and corrections. I also did some work on the presentation to make it look more like a OTB esri widget. Be sure to overwrite all your files with these and not just the Widget.js&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 14:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849041#M10714</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-09-11T14:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849042#M10715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed this a little as I wanted to have a separate header for each return result.&amp;nbsp; My problem is that the way it returns the tables is never consistent.&amp;nbsp; Which ever one finishes first gets displayed first.&amp;nbsp; any idea how to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;function&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (jobInfo) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; jobNames = Object.keys(jobInfo.results);&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;function&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (name, index) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.gp.getResultData(jobInfo.jobId, name, lang.hitch(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.renderResult, name));&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;function&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (name, result) {&lt;/SPAN&gt;

&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;//this.shelter.hide();&lt;/SPAN&gt;
&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;
&lt;/SPAN&gt;
&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; resultArray = result.value.features;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (name === &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"LRM_DR1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString += &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;table class="test"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Corridor and Roadbed&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Accum. Mileage&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;else&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (name === &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"LRM_DC_RM_MI1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;){&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString += &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;table class="test"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Route_RM&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RM Offset&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (resultArray.length &amp;gt; 0) {&lt;/SPAN&gt;

&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;//loop through and populate table&lt;/SPAN&gt;
&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;
&lt;/SPAN&gt;
&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;for&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; i = 0; i &amp;lt; resultArray.length; i++) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (name === &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"LRM_DR1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString += &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; + resultArray&lt;I&gt;.attributes.RID + &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; +&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;else&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (name === &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"LRM_DC_RM_MI1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString += &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; + resultArray&lt;I&gt;.attributes.Route + &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; +&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString += &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'&amp;lt;/table&amp;gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;else&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; {&lt;/SPAN&gt;

&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;//Return No results message&lt;/SPAN&gt;
&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;
&lt;/SPAN&gt;
&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString = &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"No result Returned please click on Route"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; div;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.shelter.hide();&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (GLOBE.wkid === 4326) {&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"resultDiv"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;else&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (GLOBE.wkid === 32100) {&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"stplmDiv"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;else&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (GLOBE.wkid === 102700) {&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"stplfDiv"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;else&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; {&lt;/SPAN&gt;

&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;'resultDiv'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.resultString;&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (GLOBE.wkid !== 102100) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; outSR = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;new&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; SpatialReference(102100);&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;this&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;.gsvc.project([GLOBE.evt], outSR, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;function&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (projectPoints) {&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; pt = projectPoints[0];&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; point = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;new&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; Point(pt);&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; newGraphic = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;new&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; Graphic(point, GLOBE.pointSymbol);&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:26:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849042#M10715</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2021-12-12T10:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849043#M10716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Terry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you want two different tables then you need to move away from the current one renderresults function handler and separate it into two different functions. That way you define the the whole table placement and header content based on the result name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 00:05:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849043#M10716</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-09-15T00:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849044#M10717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It just seems like since my GP service is returning all of the data I should be able to tell it where to show the data and in what order.  I’m trying to get my mind around why sometimes it returns that data correctly and others the order is changed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 20:39:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849044#M10717</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-09-15T20:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849045#M10718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Terry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; This is just the nature of asynchronous code. You would be better off focusing on my last suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 21:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849045#M10718</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-09-15T21:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Array Issue</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849046#M10719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I’m passing the corridor and the offset in as the x/y coordinate..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 13:25:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/array-issue/m-p/849046#M10719</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-09-16T13:25:41Z</dc:date>
    </item>
  </channel>
</rss>

