<?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: Add constraint comparing another field and NULL in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834970#M19387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh, many thanks Doug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 May 2019 05:37:53 GMT</pubDate>
    <dc:creator>DamianMilne</dc:creator>
    <dc:date>2019-05-23T05:37:53Z</dc:date>
    <item>
      <title>Add constraint comparing another field and NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834965#M19382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have two integer fields, "FIELD A" and "FIELD B". I am trying to add a constraint on "Field A"&amp;nbsp; that meets the following conditions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If "Field B" IS NULL, "Field A" can be any value (including NULL)&lt;/P&gt;&lt;P&gt;If "Field B" IS NOT NULL, "Field A" must be greater than "Field B"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone assist with the syntax please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Damian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2019 00:14:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834965#M19382</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2019-05-15T00:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add constraint comparing another field and NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834966#M19383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In 123 Null is empty string.&amp;nbsp; So compare to '' or "".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2019 15:25:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834966#M19383</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2019-05-15T15:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Add constraint comparing another field and NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834967#M19384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adding on to Doug's comment, use the function string-length(${q}) &amp;gt; 0 to test for null - all question types evaluate to a string length of 0 when null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2019 22:31:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834967#M19384</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2019-05-20T22:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add constraint comparing another field and NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834968#M19385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you gents, however the answer still alludes me. The closest I can come up with is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;SPAN style="background-color: #ffffff;"&gt;string-length(${Field_B}) &amp;gt; 0,${Field_A} &amp;gt; ${Field_B},*** any number or NULL ***)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Any further assistance would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2019 23:40:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834968#M19385</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2019-05-20T23:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add constraint comparing another field and NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834969#M19386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;You just want it to eval to true so just give it a 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;if(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;string-length(${Field_B}) &amp;gt; 0,${Field_A} &amp;gt; ${Field_B},1)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 14:06:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834969#M19386</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2019-05-21T14:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add constraint comparing another field and NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834970#M19387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh, many thanks Doug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 05:37:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/add-constraint-comparing-another-field-and-null/m-p/834970#M19387</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2019-05-23T05:37:53Z</dc:date>
    </item>
  </channel>
</rss>

