<?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: Can relevant field be dependent on if condition IS NOT NULL in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864023#M26538</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a similar problem, but with numbers rather than a string. I want to test to see if the user has missed field. This is different to it being a required field as the user will have the option to acknowledge that it is a valid NULL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/JTedrick-esristaff"&gt;JTedrick-esristaff&lt;/A&gt;‌ provided me some great advice on how to do the acknowledge, but the NULL test side of it has really got me chasing my tail!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2017 05:19:07 GMT</pubDate>
    <dc:creator>DanielMcIlroy</dc:creator>
    <dc:date>2017-02-27T05:19:07Z</dc:date>
    <item>
      <title>Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864020#M26535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using&amp;nbsp;a custom URL feature in Collector to allow users to open an inspection form in Survey123 from the feature needing to be inspected. Configured to have fields come over into text fields in Survey123, that the inspectors must answer. Using the revelant field, can I make those secondary fields dependent on if the primary(linked field) is not null?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Survey with Primary and Secondary fields" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/281686_Capture.JPG" style="width: 620px; height: 769px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="XLS Form" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/281714_Capture1.JPG" style="width: 620px; height: 67px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 15:59:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864020#M26535</guid>
      <dc:creator>CarlHolt1</dc:creator>
      <dc:date>2016-12-12T15:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864021#M26536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Did you try adding something like &lt;EM&gt;string-length(${PrimaryQuestion})&amp;gt;0&lt;/EM&gt; into the &lt;EM&gt;Relevant&lt;/EM&gt; column of your secondary question?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 19:24:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864021#M26536</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2016-12-12T19:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864022#M26537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See &lt;A href="https://community.esri.com/people/ichivite-esristaff"&gt;ichivite-esristaff&lt;/A&gt;‌ this is why ya'll are the best and so very helpful. I looked on XLSForm.org and other help docs. That worked. Thanks as always.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 19:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864022#M26537</guid>
      <dc:creator>CarlHolt1</dc:creator>
      <dc:date>2016-12-12T19:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864023#M26538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a similar problem, but with numbers rather than a string. I want to test to see if the user has missed field. This is different to it being a required field as the user will have the option to acknowledge that it is a valid NULL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/JTedrick-esristaff"&gt;JTedrick-esristaff&lt;/A&gt;‌ provided me some great advice on how to do the acknowledge, but the NULL test side of it has really got me chasing my tail!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 05:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864023#M26538</guid>
      <dc:creator>DanielMcIlroy</dc:creator>
      <dc:date>2017-02-27T05:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864024#M26539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, I replied in the original thread - the information on empty values is at&amp;nbsp;&lt;A class="link-titled" href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_2954BF95CF674951AE9691A656CF157C" title="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_2954BF95CF674951AE9691A656CF157C"&gt;Formulas—Survey123 for ArcGIS | ArcGIS&lt;/A&gt;&amp;nbsp;- the string-length function also provides the null check for numerics.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 17:01:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864024#M26539</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-02-27T17:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864025#M26540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3263"&gt;James Tedrick&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you supply an example of the syntax for 'NaN' within a constraint? I'm struggling to get it right. As you indicate above it's part of the string-length function. The documentation also states that &lt;EM&gt;"The NaN value compared to any other value will only be true in a calculation of an "is not equal" value comparison. All other expressions will result in false." &lt;/EM&gt;As such, I came up with the below but it fails to trigger the constraint if {QUANTITY1} is left blank:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if(selected(${MATERIALS_USED}, 'YES'), string-length(${QUANTITY1})!=NaN, true())&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2018 11:47:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864025#M26540</guid>
      <dc:creator>AndrewHargreaves2</dc:creator>
      <dc:date>2018-09-13T11:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864026#M26541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The check for string-length is to compare it to 0 - the string-length function will return 0 for&amp;nbsp;null or NaN values. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #f6f6f6;"&gt;string-length(${QUANTITY1}) &amp;gt; 0&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;is true for non-NaN or null values, false otherwise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The discussion on NaN/null you cite concerns&amp;nbsp;understanding how those values affect calculations in other questions, not how to test for NaN/null. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2018 15:58:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864026#M26541</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-09-13T15:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can relevant field be dependent on if condition IS NOT NULL</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864027#M26542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm...struggling to wrap my head around this one.&amp;nbsp;If I understand what you're saying:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;{QUANTITY1} is an&amp;nbsp;&lt;/SPAN&gt;INT question and if left blank records as &lt;EM&gt;null&lt;/EM&gt;. I want to prevent this and ensure there's always a number greater than 0 in there.&lt;/LI&gt;&lt;LI&gt;If "&lt;SPAN style="background-color: #ffffff;"&gt;&lt;EM&gt;the string-length function will return 0 for&amp;nbsp;null or NaN values"&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;then I need to set&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;my constraint to check the string-length for 0, and if true, fire the constraint message.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I use this expression to check that if the user has&amp;nbsp;indicated they've used materials, they can't leave the quantity blank:&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;EM&gt;if(selected(${MATERIALS_USED}, 'YES'), string-length(${QUANTITY1})!=0, true())&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;However, it fails to fire the constrain if {MATERIALS_USED} = 'YES' and {QUANTITY1} is left blank.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I've asked this in a similar thread &lt;A _jive_internal="true" href="https://community.esri.com/message/811926-re-how-to-set-minimum-characters-constraints-in-survey123-connect?commentID=811926#comment-811926"&gt;here&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2018 19:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-relevant-field-be-dependent-on-if-condition-is/m-p/864027#M26542</guid>
      <dc:creator>AndrewHargreaves2</dc:creator>
      <dc:date>2018-09-13T19:31:02Z</dc:date>
    </item>
  </channel>
</rss>

