<?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: Constraint not being honored in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031535#M32816</link>
    <description>&lt;P&gt;I have never used geocoder so not sure exactly what it returns.&amp;nbsp; Usually if I do not know I create a note or text field to show the value then I know exactly what it is.&amp;nbsp; Then test for that.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 15:53:59 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2021-03-01T15:53:59Z</dc:date>
    <item>
      <title>Constraint not being honored</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031381#M32804</link>
      <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;I've built a survey in Connect (3.12) and I'm having trouble with one part of it. My end goal is to have the survey PREVENT submission if a geocoded address field (${matchaddress} is null. Seems easy right? I thought I could create a select_one yes/no ${validaddress} field, calculate it to be 'no' if ${matchaddress} is null and 'yes' if ${matchaddress} is not null, and put a constraint on this field so that it will not let the user submit a record if ${validaddress} = 'no', but it doesn't work. It lets me submit a record even if the matched address is null and validaddress is no. I've also tried various iterations of this using ${matchaddress} = null, since it should have the same result. No dice.&lt;/P&gt;&lt;P&gt;What's weird is that if I put ${matchaddress} = 'null' in the relevant column, the ${validaddress} field either shows or doesn't show exactly as it should. So why isn't the constraint working the same way? I've worked on this for days and days and I feel crazy and I'm really hoping someone on the Survey123 team can briefly work with me and take a look. I'd prefer to email my XLS rather than share here.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 23:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031381#M32804</guid>
      <dc:creator>ShelbyZelonisRoberson</dc:creator>
      <dc:date>2021-02-28T23:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint not being honored</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031508#M32811</link>
      <description>&lt;P&gt;Have you tried required?&amp;nbsp; Constraints cannot test for blank '' since it could be a relevant hiding.&amp;nbsp; When a question is blank in 123 it gets '' not null.&amp;nbsp; Null is not used.&lt;/P&gt;&lt;P&gt;Hope that works.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 15:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031508#M32811</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-03-01T15:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint not being honored</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031533#M32814</link>
      <description>&lt;P&gt;Yep I've tried required on a variety of the fields to try and get it to not allow submission but I haven't found a solution where it works properly. As for nulls... I'm not sure if the matchaddress question is coming up blank or truly "null" because it's reaching out to a geocoder, matching an address, and returning the matched address. If it doesn't find an address, I'm not sure what it comes back with. I assumed the matched address field was coming back as null when no address was found, because the relevant column&amp;nbsp;${matchaddress} = 'null' works as I expect it to.&lt;/P&gt;&lt;P&gt;I'll try playing around with '' - thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 15:50:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031533#M32814</guid>
      <dc:creator>ShelbyZelonisRoberson</dc:creator>
      <dc:date>2021-03-01T15:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint not being honored</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031535#M32816</link>
      <description>&lt;P&gt;I have never used geocoder so not sure exactly what it returns.&amp;nbsp; Usually if I do not know I create a note or text field to show the value then I know exactly what it is.&amp;nbsp; Then test for that.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 15:53:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031535#M32816</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-03-01T15:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint not being honored</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031954#M32862</link>
      <description>&lt;P&gt;I played around a lot with this using both 'null' and '' as suggested by Doug.&lt;/P&gt;&lt;P&gt;The thing that finally worked:&lt;/P&gt;&lt;P&gt;1. Delete the validaddress field altogether - for some reason this seems to have been throwing it off&lt;/P&gt;&lt;P&gt;2. Set the constraint on matchaddress to be ${matchaddress}!='null' (also removed previous expression in the relevant column). I tried a constraint for ${matchaddress}!='', but the geocoder is indeed returning 'null'.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 15:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1031954#M32862</guid>
      <dc:creator>ShelbyZelonisRoberson</dc:creator>
      <dc:date>2021-03-02T15:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint not being honored</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1241942#M46576</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;&amp;nbsp;if a question in blank in Survey123 and gets '' why won't the below constraint work for to force the user to enter a value?&lt;/P&gt;&lt;TABLE width="80"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="80"&gt;string(${REST_TYPE})!=''&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Note:&amp;nbsp; {REST_TYPE} is inside of a repeat...unsure if that matters?)&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 13:12:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1241942#M46576</guid>
      <dc:creator>ahargreaves_FW</dc:creator>
      <dc:date>2022-12-16T13:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint not being honored</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1242364#M46591</link>
      <description>&lt;P&gt;Why are you using string()?&amp;nbsp; Is it a number field?&amp;nbsp; Is it a select multiple?&lt;/P&gt;&lt;P&gt;I have seen it be picky on some field types.&amp;nbsp; Also make sure to have spaces in there just in case.&lt;/P&gt;&lt;P&gt;try some of these options&lt;/P&gt;&lt;P&gt;${REST_TYPE} != ''&lt;/P&gt;&lt;P&gt;${REST_TYPE} != ""&lt;/P&gt;&lt;P&gt;string-length(${REST_TYPE}) != 0&lt;/P&gt;&lt;P&gt;string-length(${REST_TYPE}) &amp;gt; 0&lt;/P&gt;&lt;P&gt;If a select try&lt;/P&gt;&lt;P&gt;count-selected(${REST_TYPE}) != 0&lt;/P&gt;&lt;P&gt;count-selected(${REST_TYPE}) &amp;gt; 0&lt;/P&gt;&lt;P&gt;hope one of those does it.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 15:07:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-not-being-honored/m-p/1242364#M46591</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-12-19T15:07:39Z</dc:date>
    </item>
  </channel>
</rss>

