<?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: Survey123 Pulldata from Layer Help in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592076#M61533</link>
    <description>&lt;P&gt;No luck, unfortunately. Even adding a hardcoded value in place of the survey field (forklift_number) doesn't seem to return the results I'm looking for.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2025 00:14:29 GMT</pubDate>
    <dc:creator>SaadShahzad</dc:creator>
    <dc:date>2025-03-05T00:14:29Z</dc:date>
    <item>
      <title>Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591365#M61484</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to create a note in my survey that queries previous submission records in the feature layer to notify the survey-taker of an existing inspection record within the last 24 hours, I am trying to use this pulldata function in the calculate field to achieve it, but it does not seem to work, and permanently shows "Forklift has no inspections in the last 24 hours" - despite an existing inspection within the last 24 hours.&lt;/P&gt;&lt;P&gt;forklift_number is an integer field in my survey that holds the unique ID of the forklift&lt;/P&gt;&lt;P&gt;inspection_date is a dateTime field in my survey that holds the inspection date and time for a forklift&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if(
  pulldata("@layer", "https://gis.blank.com/server/rest/services/Hosted/service_0d41872c64f34120b9881d67843aaes2/FeatureServer/0", "count", "forklift_number = '${forklift_number}' AND inspection_date &amp;gt;= timestamp(now() - 86400000)") &amp;gt; 0,
  "Forklift was last inspected in the last 24 hours.",
  "Forklift has no inspections in the last 24 hours."
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help troubleshooting will be greatly appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 19:44:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591365#M61484</guid>
      <dc:creator>SaadShahzad</dc:creator>
      <dc:date>2025-03-03T19:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591380#M61485</link>
      <description>&lt;P&gt;Common issue that pulldata does not work inside an if statement.&amp;nbsp; Break it out to its own field then run the if on that field.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 20:19:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591380#M61485</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2025-03-03T20:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591452#M61500</link>
      <description>&lt;P&gt;Hmm, okay so I separated it and I broke it down to get to the bottom of the issue, but still can't seem to even get this simplified pulldata (without the check for date and time) to work:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;pulldata("@layer", "https://gis.blank.com/server/rest/services/Hosted/service_0d41822d64f34120b9884d67848aaef2/FeatureServer/0", "count", "forklift_number = '${forklift_number}' " )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something tells me I don't know how to use the "count" clause properly. I don't get any errors, but I don't get any values returned either. Shouldn't it return an integer value back with the number of records that exist with the forklift number I plugged into the survey?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I have two records in the feature layer with the Forklift Number: "123" associated to them, shouldn't the pulldata request return a count of 2?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 22:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591452#M61500</guid>
      <dc:creator>SaadShahzad</dc:creator>
      <dc:date>2025-03-03T22:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591471#M61502</link>
      <description>&lt;P&gt;Looks like you are missing the &lt;SPAN class=""&gt;getValue&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; part?&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_BB97985CAFB740EE8AEF99EFD6E238E3" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_BB97985CAFB740EE8AEF99EFD6E238E3&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 23:02:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1591471#M61502</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2025-03-03T23:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592032#M61528</link>
      <description>&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;Thanks for your help so far. I changed some stuff up and took another approach utilizing some of the information I found on the forum and docs.&lt;/P&gt;&lt;P&gt;What I'm trying to achieve now (before I attempt adding a "last 24 hours" clause) is to query the count of Forklift Inspections associated with a Forklift Number in my survey (which is an integer field). This pulldata request seems to be returning the entire count of the records in my layer, so it doesn't seem like my 'where' clause is working correctly. Any tips?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;pulldata("@layer", "getValue", "attributes.forkliftInspections",  concat("https://gis.blank.com/server/rest/services/Hosted/service_0b41872c64f34120b9884d67848aaef2/FeatureServer/0", '?outStatistics=[{"statisticType": "count","onStatisticField": "forklift_number","outStatisticFieldName": "forkliftInspections"}]', "&amp;amp;where=forklift_number=", ${forklift_number}, "&amp;amp;t=",now()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 21:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592032#M61528</guid>
      <dc:creator>SaadShahzad</dc:creator>
      <dc:date>2025-03-04T21:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592063#M61530</link>
      <description>&lt;P&gt;Not sure as I have not done it but it seems to be missing a quote around the value.&lt;BR /&gt;maybe&amp;nbsp;&amp;nbsp;&lt;BR /&gt;"&amp;amp;where=forklift_number='", ${forklift_number}, "'&amp;amp;t=",&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 23:25:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592063#M61530</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2025-03-04T23:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592076#M61533</link>
      <description>&lt;P&gt;No luck, unfortunately. Even adding a hardcoded value in place of the survey field (forklift_number) doesn't seem to return the results I'm looking for.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 00:14:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592076#M61533</guid>
      <dc:creator>SaadShahzad</dc:creator>
      <dc:date>2025-03-05T00:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592245#M61545</link>
      <description>&lt;P&gt;In the samples I do not see it using the word where?&amp;nbsp; It is a comma then the query.&lt;/P&gt;&lt;P&gt;pulldata("@layer", "getValue", "attributes.NAME", "&lt;A href="https://services5.arcgis.com/jMCHJcLe13FaKCFB/arcgis/rest/services/US_Counties/FeatureServer/1?orderByFields=POPULATION" target="_blank"&gt;https://services5.arcgis.com/jMCHJcLe13FaKCFB/arcgis/rest/services/US_Counties/FeatureServer/1?orderByFields=POPULATION&lt;/A&gt; DESC&amp;amp;resultOffset=9", "STATE_NAME = 'California'")&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 15:32:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592245#M61545</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2025-03-05T15:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Pulldata from Layer Help</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592303#M61548</link>
      <description>&lt;P&gt;Hi Doug, so that was part of the issue and then there were a few other things I had to change. But it works great now! Thanks again.&lt;/P&gt;&lt;P&gt;Here's the working expression for anyone that might be trying to achieve the same:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;pulldata("@layer", "getValue", "attributes.forkliftInspections", concat("https://gis.blank.com/server/rest/services/Hosted/service_0b41572c64f34120b9584d67848aaef2/FeatureServer/0", '?outStatistics=[{"statisticType": "count","onStatisticField": "forklift_number","outStatisticFieldName": "forkliftInspections"}]'), concat("forklift_number=", ${forklift_number}) , "&amp;amp;t=", now())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now to figure out the last 24 hours clause to so that it only returns the count of forklift inspections in the last 24 hours for a specific forklift number.....&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 17:03:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-pulldata-from-layer-help/m-p/1592303#M61548</guid>
      <dc:creator>SaadShahzad</dc:creator>
      <dc:date>2025-03-05T17:03:30Z</dc:date>
    </item>
  </channel>
</rss>

