<?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: How do you create a trigger to run a javascript in an xls form? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880500#M30484</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem Philip and thanks so much for your help. The issue occurs in the field app on my tablet. Everything works as expected in Connect but when I publish the form and download it to my tablet, the relevant expressions do not work to trigger the Javascript. I have tried downloading to two different device models, one running android 6 and one running android 7.1 - same result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2020 14:36:56 GMT</pubDate>
    <dc:creator>BryceHancock</dc:creator>
    <dc:date>2020-08-19T14:36:56Z</dc:date>
    <item>
      <title>How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880495#M30479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have form that runs a custom javascript function to calculate the number of records based on a selection and value entered outside of a repeat. The javascript works as expected but it seems to run whenever a&amp;nbsp;new repeat is&amp;nbsp;added, creating inefficiencies with data entry in the field; each new repeat record takes up to 4 seconds to load. Is there a way to set a trigger in a javascript function, so it runs only when values from two fields are changed outside a repeat? I found the javascript .change method but I am not sure the proper syntax to implement it in Survey123? Can anyone help with this? Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2020 18:57:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880495#M30479</guid>
      <dc:creator>BryceHancock</dc:creator>
      <dc:date>2020-08-13T18:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880496#M30480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bryce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried making the question that has the pulldata @ JS function in it only relevant when those two questions have a value or the value changes. When a question is not relevant, the calculation or pulldata expression does not execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2020 03:35:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880496#M30480</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-14T03:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880497#M30481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Phil. What would the proper syntax be for the relevant expression? I tried&amp;nbsp;(${SPECIES_LU}!='') and (${FISH_LENGTH_LU}!='') but the Javascript still fires when the value in only one field is changed. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2020 16:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880497#M30481</guid>
      <dc:creator>BryceHancock</dc:creator>
      <dc:date>2020-08-14T16:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880498#M30482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I figured out the proper syntax for the relevant field. I was using single quotes instead of double quotes and I added another parenthesis to enclose the two expressions as follows:&amp;nbsp;((${SPECIES_LU}!=") and (${FISH_LENGTH_LU}!="))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The expression works fine on my computer through Survey123 connect but when I publish and download to my device, the relevant expressions do not work. The script still fires when a value is entered in just one field in the capture probability calculator, and the lag time between entering repeat records in the fish measurements is still approximately 4 seconds. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached my xls form for further reference. The script operates on the capture probability calculator. I do have&amp;nbsp;another script in the fish measurement repeat to autodefault to last record entered for two fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2020 18:18:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880498#M30482</guid>
      <dc:creator>BryceHancock</dc:creator>
      <dc:date>2020-08-14T18:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880499#M30483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bryce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay, I am still looking into this issue. Is the problem you are seeing with the field app or the web app? It wasn't clear from your comments above? If you are seeing it work as expected in Connect, then it should work the same in the field app, however there could be an issue if you try to run the same JS and relevant fields in repeats in the web app?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 10:33:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880499#M30483</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-19T10:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880500#M30484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem Philip and thanks so much for your help. The issue occurs in the field app on my tablet. Everything works as expected in Connect but when I publish the form and download it to my tablet, the relevant expressions do not work to trigger the Javascript. I have tried downloading to two different device models, one running android 6 and one running android 7.1 - same result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 14:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880500#M30484</guid>
      <dc:creator>BryceHancock</dc:creator>
      <dc:date>2020-08-19T14:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880501#M30485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A bit more information: the relevant fields I am using to trigger the javascript calculation are outside the repeat. I do have a different javascript within the repeats but it is only to repeat the value in two fields for the last record entered, so should not have any effect on the relevant&amp;nbsp;expression&amp;nbsp;outside the repeat. This seems like a bug to me. Like the relevant expressions are not being recognized in the field app on my tablet for some reason.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 14:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880501#M30485</guid>
      <dc:creator>BryceHancock</dc:creator>
      <dc:date>2020-08-19T14:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880502#M30486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bryce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James has picked up this same issue you reported on &lt;A href="https://earlyadopter.esri.com/project/forum/thread.html?cap=e69ef91f45744b98882c651f7b518eb7&amp;amp;forid={f93a6a79-f627-4727-8868-fc5e73406706}&amp;amp;topid={E832C75B-2F41-400C-9177-0B5786444C54}"&gt;EAC&lt;/A&gt; and asked you a few questions, so if you work with him via that post we can hopefully get a solution for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2020 04:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880502#M30486</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-21T04:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a trigger to run a javascript in an xls form?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880503#M30487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Philip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I answered James' questions and sent a couple of follow-up messages in EAC on performance issues we had last week when attempting to use the survey. I haven't heard back from James yet, and I know you're all very busy, so don't mean to pester you, but could you advise on whether relevant issue is a bug, or do I need to rewrite the Javascript to achieve the desired result? Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2020 18:53:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-do-you-create-a-trigger-to-run-a-javascript-in/m-p/880503#M30487</guid>
      <dc:creator>BryceHancock</dc:creator>
      <dc:date>2020-09-04T18:53:02Z</dc:date>
    </item>
  </channel>
</rss>

