<?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 javascript not working after S123 version 3.18 update in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-not-working-after-s123-version-3-18/m-p/1323075#M51430</link>
    <description>&lt;P&gt;I have tried many ways to trouble shoot this issue with a javascript pulldata function that occurred after our android devices were updated to run version 3.18.145 of survey 123. Everything still works fine on devices running earlier versions (e.g.; 3.17). I used the posts here &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/prepopulate-answers-in-a-repeat-with-last-values/td-p/1093928" target="_self"&gt;prepopulate-answers-in-a-repeat-with-last-values&lt;/A&gt;&amp;nbsp;to help with my initial trouble shooting, but I am still not getting it to work with the updated devices.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the pulldata script is used to prepopulate a survey answer with a previous value, in our case the initials of the observer, to be repeated for multiple records. The survey does use nested repeats, the observer field is in outer repeat.&amp;nbsp;&lt;/P&gt;&lt;P&gt;js =&lt;/P&gt;&lt;P&gt;function previousvalue (repeat, position, fieldname)&lt;/P&gt;&lt;P&gt;{if (position &amp;gt; 1) {return repeat[position-2][fieldname];&lt;/P&gt;&lt;P&gt;}}&lt;/P&gt;&lt;P&gt;and the calculation is&amp;nbsp;once(pulldata("@javascript", "functions.js", "previousvalue", ${s123_sn_habitat}, number(position(${s123_sn_habitat})), "observers"))&lt;/P&gt;&lt;P&gt;where s123_sn_habitat is the name of the repeat and "observers" is the field name.&lt;/P&gt;&lt;P&gt;I have attached the xls form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2023 17:18:38 GMT</pubDate>
    <dc:creator>AndreaPecharich</dc:creator>
    <dc:date>2023-08-28T17:18:38Z</dc:date>
    <item>
      <title>javascript not working after S123 version 3.18 update</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-not-working-after-s123-version-3-18/m-p/1323075#M51430</link>
      <description>&lt;P&gt;I have tried many ways to trouble shoot this issue with a javascript pulldata function that occurred after our android devices were updated to run version 3.18.145 of survey 123. Everything still works fine on devices running earlier versions (e.g.; 3.17). I used the posts here &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/prepopulate-answers-in-a-repeat-with-last-values/td-p/1093928" target="_self"&gt;prepopulate-answers-in-a-repeat-with-last-values&lt;/A&gt;&amp;nbsp;to help with my initial trouble shooting, but I am still not getting it to work with the updated devices.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the pulldata script is used to prepopulate a survey answer with a previous value, in our case the initials of the observer, to be repeated for multiple records. The survey does use nested repeats, the observer field is in outer repeat.&amp;nbsp;&lt;/P&gt;&lt;P&gt;js =&lt;/P&gt;&lt;P&gt;function previousvalue (repeat, position, fieldname)&lt;/P&gt;&lt;P&gt;{if (position &amp;gt; 1) {return repeat[position-2][fieldname];&lt;/P&gt;&lt;P&gt;}}&lt;/P&gt;&lt;P&gt;and the calculation is&amp;nbsp;once(pulldata("@javascript", "functions.js", "previousvalue", ${s123_sn_habitat}, number(position(${s123_sn_habitat})), "observers"))&lt;/P&gt;&lt;P&gt;where s123_sn_habitat is the name of the repeat and "observers" is the field name.&lt;/P&gt;&lt;P&gt;I have attached the xls form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 17:18:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-not-working-after-s123-version-3-18/m-p/1323075#M51430</guid>
      <dc:creator>AndreaPecharich</dc:creator>
      <dc:date>2023-08-28T17:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: javascript not working after S123 version 3.18 update</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-not-working-after-s123-version-3-18/m-p/1323103#M51431</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/582683"&gt;@AndreaPecharich&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Could you also share the JS function?&amp;nbsp; It may be easier to e-mail it (jtedrick AT esri.com)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 18:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-not-working-after-s123-version-3-18/m-p/1323103#M51431</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2023-08-28T18:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: javascript not working after S123 version 3.18 update</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-not-working-after-s123-version-3-18/m-p/1328412#M51715</link>
      <description>&lt;P&gt;Sorry for the delay. I emailed the function&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 17:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-not-working-after-s123-version-3-18/m-p/1328412#M51715</guid>
      <dc:creator>AndreaPecharich</dc:creator>
      <dc:date>2023-09-13T17:58:40Z</dc:date>
    </item>
  </channel>
</rss>

