<?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: pulldata(&amp;quot;@layer&amp;quot;) returning datetime in web app instead of true/false in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-returning-datetime-in-web/m-p/1315046#M51000</link>
    <description>&lt;P&gt;I guess I didn't explain my problem correctly. Basically I wanted to only show a field if the last inspection date was older than X days (4 in this case). I tried your suggestion&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;&amp;nbsp;but then my field was a date, which was not what I wanted.&lt;/P&gt;&lt;P&gt;I ended up going back to the old &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528" target="_self"&gt;Dates and Time in Survey123&lt;/A&gt; and noticed this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikAMD_0-1691069160590.png" style="width: 689px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77196i6520E2CF5FD3CD4A/image-dimensions/689x140?v=v2" width="689" height="140" role="button" title="mikAMD_0-1691069160590.png" alt="mikAMD_0-1691069160590.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;mikAMD_0-1691069160590.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;So I checked the &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/decimaldatetime.htm" target="_self"&gt;documentation&lt;/A&gt; for decimal-date-time().&lt;BR /&gt;&lt;P&gt;After plenty of trial and error, I got it working. I had to divide the calculations in multiple fields, for some reason doing it as a one liner didn't work (field3_tf).&lt;/P&gt;&lt;TABLE border="1" width="74.45155350636382%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;appearance&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;calculation&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;bind::esri:fieldType&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;body::esri::visible&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;integer&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;today_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;todat_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;hidden&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;decimal-date-time(today())&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;null&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;integer&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;field3_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;field3_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;hidden&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;decimal-date-time(int(pulldata("@layer", "getValue", "attributes.inspection_date", "&lt;A href="https://service_url/14?orderbyfields=inspection_date" target="_blank" rel="noopener"&gt;https://service_url/14?orderbyfields=inspection_date&lt;/A&gt; desc", concat("field1 =", ${field1}, " and field2 = '1'"))))&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;null&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;text&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;field3_tf&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;field3_tf&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;hidden&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;${today_ddt} - ${field3_ddt} &amp;gt; int(decimal-date-time(4))&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;null&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;select_one blabla&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;field3&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;field 3&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;esriFieldTypeInteger&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;&lt;P&gt;${field3_tf} = true&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2023 14:12:58 GMT</pubDate>
    <dc:creator>mikaël</dc:creator>
    <dc:date>2023-08-03T14:12:58Z</dc:date>
    <item>
      <title>pulldata("@layer") returning datetime in web app instead of true/false</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-returning-datetime-in-web/m-p/1314677#M50988</link>
      <description>&lt;P&gt;I'm using pulldata("@layer") to get a datetime based on another field in the survey and I wish to compare it to another value and show true/false.&lt;/P&gt;&lt;P&gt;so my field "test1" has the pulldata function and "test2" has the pulldata function with a comparison "&amp;gt; 10" at then end, like so:&amp;nbsp;pulldata("@layer", "getValue", "attributes.inspection_date", "service_url/FeatureServer/14?orderbyfields=inspection_date desc", concat("field1 =", ${field1}, " and field2 = '1'")) &amp;gt; 10&lt;/P&gt;&lt;P&gt;in survey123 connect (and android app) I get :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikAMD_0-1690995958077.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77116iD7B840B8C229F76C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mikAMD_0-1690995958077.png" alt="mikAMD_0-1690995958077.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;mikAMD_0-1690995958077.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;which is correct, but in the web app, I get:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikAMD_1-1690996009049.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77117i163932F53FD21CD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mikAMD_1-1690996009049.png" alt="mikAMD_1-1690996009049.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;mikAMD_1-1690996009049.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;where "test2" should also return "true".&lt;/P&gt;&lt;P&gt;I tried putting int() around my pulldata() but doesn't work. I also tried "field2 = 1" and "field2 = 'yes'", doesn't work either.&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 14:12:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-returning-datetime-in-web/m-p/1314677#M50988</guid>
      <dc:creator>mikaël</dc:creator>
      <dc:date>2023-08-03T14:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: pulldata("@layer") returning datetime in web app instead of true/false</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-returning-datetime-in-web/m-p/1314721#M50989</link>
      <description>&lt;P&gt;Try setting the&amp;nbsp;bind::type column to date or datetime.&amp;nbsp; That usually does it for numbers so I think it may work for this also.&amp;nbsp; All items in 123 are treated like strings when using calculate unless you set this column.&amp;nbsp; Other newer way is to set the type to date then set appearance to hidden.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that does it&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 18:15:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-returning-datetime-in-web/m-p/1314721#M50989</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-08-02T18:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: pulldata("@layer") returning datetime in web app instead of true/false</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-returning-datetime-in-web/m-p/1315046#M51000</link>
      <description>&lt;P&gt;I guess I didn't explain my problem correctly. Basically I wanted to only show a field if the last inspection date was older than X days (4 in this case). I tried your suggestion&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;&amp;nbsp;but then my field was a date, which was not what I wanted.&lt;/P&gt;&lt;P&gt;I ended up going back to the old &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528" target="_self"&gt;Dates and Time in Survey123&lt;/A&gt; and noticed this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikAMD_0-1691069160590.png" style="width: 689px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77196i6520E2CF5FD3CD4A/image-dimensions/689x140?v=v2" width="689" height="140" role="button" title="mikAMD_0-1691069160590.png" alt="mikAMD_0-1691069160590.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;mikAMD_0-1691069160590.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;So I checked the &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/decimaldatetime.htm" target="_self"&gt;documentation&lt;/A&gt; for decimal-date-time().&lt;BR /&gt;&lt;P&gt;After plenty of trial and error, I got it working. I had to divide the calculations in multiple fields, for some reason doing it as a one liner didn't work (field3_tf).&lt;/P&gt;&lt;TABLE border="1" width="74.45155350636382%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;appearance&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;calculation&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;bind::esri:fieldType&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&lt;STRONG&gt;body::esri::visible&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;integer&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;today_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;todat_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;hidden&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;decimal-date-time(today())&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;null&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;integer&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;field3_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;field3_ddt&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;hidden&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;decimal-date-time(int(pulldata("@layer", "getValue", "attributes.inspection_date", "&lt;A href="https://service_url/14?orderbyfields=inspection_date" target="_blank" rel="noopener"&gt;https://service_url/14?orderbyfields=inspection_date&lt;/A&gt; desc", concat("field1 =", ${field1}, " and field2 = '1'"))))&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;null&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="178px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;text&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;field3_tf&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;field3_tf&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;hidden&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;${today_ddt} - ${field3_ddt} &amp;gt; int(decimal-date-time(4))&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;null&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="142px"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;select_one blabla&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;field3&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;field 3&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;esriFieldTypeInteger&lt;/TD&gt;&lt;TD width="11.11111111111111%" height="46px"&gt;&lt;P&gt;${field3_tf} = true&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 14:12:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-returning-datetime-in-web/m-p/1315046#M51000</guid>
      <dc:creator>mikaël</dc:creator>
      <dc:date>2023-08-03T14:12:58Z</dc:date>
    </item>
  </channel>
</rss>

