<?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: Autocalculation not working in Web survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1137376#M40013</link>
    <description>I've seen this chart, but I'll have to do more testing on the formula.&lt;BR /&gt;</description>
    <pubDate>Wed, 26 Jan 2022 14:15:38 GMT</pubDate>
    <dc:creator>chelynnes</dc:creator>
    <dc:date>2022-01-26T14:15:38Z</dc:date>
    <item>
      <title>Autocalculation not working in Web survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1136889#M39971</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chelynnes_0-1643125078195.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/32223i9864C7F6031E7FAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chelynnes_0-1643125078195.png" alt="chelynnes_0-1643125078195.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;chelynnes_0-1643125078195.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why are these calculations working in connect and field app, but not webform?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 15:38:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1136889#M39971</guid>
      <dc:creator>chelynnes</dc:creator>
      <dc:date>2022-01-25T15:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Autocalculation not working in Web survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1136917#M39974</link>
      <description>&lt;P&gt;Field app :&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chelynnes_0-1643127564259.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/32233iCC0ADC487C87830C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chelynnes_0-1643127564259.png" alt="chelynnes_0-1643127564259.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;chelynnes_0-1643127564259.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Web :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chelynnes_1-1643127817766.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/32234iF2DE5375F5F334F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chelynnes_1-1643127817766.png" alt="chelynnes_1-1643127817766.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;chelynnes_1-1643127817766.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ok, so the calculations are doing something,.. but theyre not being read the same in the web and field app?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 16:24:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1136917#M39974</guid>
      <dc:creator>chelynnes</dc:creator>
      <dc:date>2022-01-25T16:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Autocalculation not working in Web survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1137218#M39996</link>
      <description>&lt;P&gt;The Survey123 web app is very particular about dates as it only works with decimal-dates.&lt;/P&gt;&lt;P&gt;More details here: &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Looking at your expression, it looks as if you are mixing decimal dates and unix dates. Connect handles it, but the web app gets a different result because it expects you to always use decimal date.&lt;/P&gt;&lt;P&gt;The table below shows the differences with other examples. Both columns will work in Connect and the field app, but only the column on the right will work in the web. Note how decimal-date-time() is used consistently to handle dates in expressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;UNIX time&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Decimal Date time&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2 weeks into the future&lt;/TD&gt;&lt;TD&gt;now() + 14*24*60*60*1000&lt;/TD&gt;&lt;TD&gt;date(decimal-date-time(now()) + &amp;nbsp;14)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Calculate age from birthday&lt;/TD&gt;&lt;TD&gt;int((today() - ${birth_date}) div (1000*24*60*60* 365.25))&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;int((decimal-date-time(today()) - decimal-date-time(${birth_date})) div 365.25)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Minutes spent for lunch&lt;/TD&gt;&lt;TD&gt;int(${LunchEnd} - ${LunchStart}) div (1000*60)&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;int((decimal-date-time(${lunchends}) - decimal-date-time(${lunchstarts})) * 24*60)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15 minutes from now&lt;/TD&gt;&lt;TD&gt;now() + 15*60*1000&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;date-time(decimal-date-time(now()) + &amp;nbsp;0.0104166675)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 26 Jan 2022 00:42:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1137218#M39996</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2022-01-26T00:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Autocalculation not working in Web survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1137376#M40013</link>
      <description>I've seen this chart, but I'll have to do more testing on the formula.&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jan 2022 14:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/autocalculation-not-working-in-web-survey123/m-p/1137376#M40013</guid>
      <dc:creator>chelynnes</dc:creator>
      <dc:date>2022-01-26T14:15:38Z</dc:date>
    </item>
  </channel>
</rss>

