<?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: Help with constraints for data validation in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597757#M61795</link>
    <description>&lt;P&gt;You can combine the &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_BB97985CAFB740EE8AEF99EFD6E238E3" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;pulldata("@layer")&lt;/FONT&gt;&lt;/A&gt; function with some &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION2_9A111BC3FC6A42D9B2559997F6E6B826" target="_self"&gt;additional URL parameters&lt;/A&gt;&amp;nbsp;such as &lt;FONT face="courier new,courier"&gt;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/#request-parameters" target="_self"&gt;orderByFields&lt;/A&gt;&lt;/FONT&gt; to sort the results appropriately. That way the data you pull (which is the first record returned by the query) will have the previous results, which you can extract with further &lt;FONT face="courier new,courier"&gt;pulldata&lt;/FONT&gt; calls and stuff into your comparison functions.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 19:53:45 GMT</pubDate>
    <dc:creator>DavidSolari</dc:creator>
    <dc:date>2025-03-20T19:53:45Z</dc:date>
    <item>
      <title>Help with constraints for data validation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597748#M61793</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;How can I create a constraint that will pull from previous survey entries and compare the values to what the user enters?&lt;/P&gt;&lt;P&gt;I need help with a survey I am creating for utility meter readings. I have the survey successfully created using a feature layer and related table in Survey123 Connect. The meter data is stored in the Meters point layer, and associated readings are stored in the Meter Readings related table.&lt;/P&gt;&lt;P&gt;My problem is that the end user has asked for a way to validate/QAQC the meter reading entries. The goal is for a user to input a meter reading, and have that entry compared to previous entries for that meter. A new reading should always be greater in value than previous readings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each meter has a GlobalID that links it to the related table and a serial number that separates it from other meters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is very appreciated!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 19:43:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597748#M61793</guid>
      <dc:creator>ZoieLowery</dc:creator>
      <dc:date>2025-03-20T19:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with constraints for data validation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597757#M61795</link>
      <description>&lt;P&gt;You can combine the &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_BB97985CAFB740EE8AEF99EFD6E238E3" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;pulldata("@layer")&lt;/FONT&gt;&lt;/A&gt; function with some &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION2_9A111BC3FC6A42D9B2559997F6E6B826" target="_self"&gt;additional URL parameters&lt;/A&gt;&amp;nbsp;such as &lt;FONT face="courier new,courier"&gt;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/#request-parameters" target="_self"&gt;orderByFields&lt;/A&gt;&lt;/FONT&gt; to sort the results appropriately. That way the data you pull (which is the first record returned by the query) will have the previous results, which you can extract with further &lt;FONT face="courier new,courier"&gt;pulldata&lt;/FONT&gt; calls and stuff into your comparison functions.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 19:53:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597757#M61795</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2025-03-20T19:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with constraints for data validation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597760#M61796</link>
      <description>&lt;P&gt;Okay, that's kind of what I was thinking. Do I need to store the pulldata function in its own question/field before calling it's return value in the constraint of the Meter Reading entry? and if so, what kind of question should I use for that, calculate?&lt;BR /&gt;&lt;BR /&gt;In tother words, can I pulldata() directly in the Meter Reading question and have it compare to the users entry all in one question, or are more steps/questions required?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 20:00:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597760#M61796</guid>
      <dc:creator>ZoieLowery</dc:creator>
      <dc:date>2025-03-20T20:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with constraints for data validation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597762#M61797</link>
      <description>&lt;P&gt;If you're validating more than one survey question you'll want to store the pulldata results in a hidden question, then extract answers from the JSON object it returns in your "constraint" column, something like:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;. &amp;gt;=&amp;nbsp;&lt;SPAN&gt;pulldata("@json", ${previous_survey}, "attributes.meter_level")&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or whatever your field names are, you get the idea.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 20:07:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597762#M61797</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2025-03-20T20:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with constraints for data validation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597796#M61799</link>
      <description>&lt;P&gt;Always put pulldata in its own field then use that field otherwise it does not run correctly.&amp;nbsp; Many posts on this.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 21:02:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597796#M61799</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2025-03-20T21:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with constraints for data validation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597998#M61808</link>
      <description>&lt;P&gt;Alright. This was my attempt at writing the calculation for pulling the last reading.&lt;BR /&gt;&lt;BR /&gt;pulldata('@layer', 'getRecord', 'attributes.Reading', '&lt;A href="https://um-facilities.maps.arcgis.com/home/item.html?id=a160d81f924545f4a563527c858bde0&amp;amp;sublayer=4" target="_blank"&gt;https://um-facilities.maps.arcgis.com/home/item.html?id=a160d81f924545f4a563527c858bde0&amp;amp;sublayer=4&lt;/A&gt;')&lt;/P&gt;&lt;P&gt;Using this formula:&lt;BR /&gt;'&lt;SPAN&gt;pulldata("@layer", "getValue", "&amp;lt;JSON property&amp;gt;", "&amp;lt;URL&amp;gt;", "&amp;lt;WHERE clause&amp;gt;")&lt;BR /&gt;I don't know what the WHERE clause should be. What I want is for it to pull the latest inputted reading value for a given serial number. The serial number is autopopulating from the point they click in field maps that brings them to the survey.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 14:23:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1597998#M61808</guid>
      <dc:creator>ZoieLowery</dc:creator>
      <dc:date>2025-03-21T14:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with constraints for data validation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1598028#M61810</link>
      <description>&lt;P&gt;Alright. This was my attempt at writing the calculation for pulling the last reading.&lt;BR /&gt;&lt;BR /&gt;pulldata('@layer', 'getRecord', 'attributes.Reading', '&lt;A href="https://um-facilities.maps.arcgis.com/home/item.html?id=a160d81f924545f4a563527c858bde0&amp;amp;sublayer=4" target="_blank" rel="noopener"&gt;https://um-facilities.maps.arcgis.com/home/item.html?id=a160d81f924545f4a563527c858bde0&amp;amp;sublayer=4&lt;/A&gt;')&lt;/P&gt;&lt;P&gt;Using this formula:&lt;BR /&gt;'&lt;SPAN&gt;pulldata("@layer", "getValue", "&amp;lt;JSON property&amp;gt;", "&amp;lt;URL&amp;gt;", "&amp;lt;WHERE clause&amp;gt;")&lt;BR /&gt;I don't know what the WHERE clause should be. What I want is for it to pull the latest inputted reading value for a given serial number. The serial number is autopopulating from the point they click in field maps that brings them to the survey.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 15:10:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-constraints-for-data-validation/m-p/1598028#M61810</guid>
      <dc:creator>ZoieLowery</dc:creator>
      <dc:date>2025-03-21T15:10:50Z</dc:date>
    </item>
  </channel>
</rss>

