<?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 Survey123 Calculation referencing a null decimal question in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784006#M6787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a calculation and I can't quite get it to work.&lt;/P&gt;&lt;P&gt;I have attached a couple screen shots to help explain what is going on.&lt;/P&gt;&lt;P&gt;The calculations I have written do not create any errors yet how the survey is filled in or rather not filled in, the answers to other questions appear when they should be null.&amp;nbsp; There are no defaults populated other than for Water Temp Device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${WTEMP_NUM},'NaN'),'',string('None'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="/legacyfs/online/424390_WATER_TEMP_GROUP Calculation Back End.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="/legacyfs/online/424409_WATER_TEMP_GROUP Calculation Front End.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2018 19:56:20 GMT</pubDate>
    <dc:creator>KatherinePadilla</dc:creator>
    <dc:date>2018-10-15T19:56:20Z</dc:date>
    <item>
      <title>Survey123 Calculation referencing a null decimal question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784006#M6787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a calculation and I can't quite get it to work.&lt;/P&gt;&lt;P&gt;I have attached a couple screen shots to help explain what is going on.&lt;/P&gt;&lt;P&gt;The calculations I have written do not create any errors yet how the survey is filled in or rather not filled in, the answers to other questions appear when they should be null.&amp;nbsp; There are no defaults populated other than for Water Temp Device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${WTEMP_NUM},'NaN'),'',string('None'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="/legacyfs/online/424390_WATER_TEMP_GROUP Calculation Back End.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="/legacyfs/online/424409_WATER_TEMP_GROUP Calculation Front End.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 19:56:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784006#M6787</guid>
      <dc:creator>KatherinePadilla</dc:creator>
      <dc:date>2018-10-15T19:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation referencing a null decimal question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784007#M6788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katherine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a choice value of 'NaN' in the WTEMP_NUM choice list, or are you attempting to determine if the question is empty? &amp;nbsp;For a single or multiple-choice question, you can use &lt;EM&gt;count-selected(${WTEMP_NUM}) = 0&lt;/EM&gt; for an empty check. &amp;nbsp;For all questions, &lt;EM&gt;string-length(&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;${WTEMP_NUM}) = 0&lt;/EM&gt; will work as a no value check.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 20:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784007#M6788</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-10-15T20:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation referencing a null decimal question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784008#M6789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the referenced field WTEMP_NUM is a fill in decimal type.&amp;nbsp; The calculation I would like to make is this:&amp;nbsp; if WTEMP_NUM is null (not filled in), then the WTEMP_QUALIFIER shall be null, otherwise it shall be None.&amp;nbsp; I am also trying to make some relevancy statements referencing this filed as well that are not behaving as desired.&amp;nbsp; I am not sure if these types of statements work with this type of field (fill in decimal).&amp;nbsp; Perhaps there is a different way to reference these types of fields that will get the desired outcome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 20:40:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784008#M6789</guid>
      <dc:creator>KatherinePadilla</dc:creator>
      <dc:date>2018-10-15T20:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation referencing a null decimal question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784009#M6790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did try to use an intermediate step that used the string-length function to calculate the 0 or 1 then referenced that field in the equation and it still did not workout as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 20:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784009#M6790</guid>
      <dc:creator>KatherinePadilla</dc:creator>
      <dc:date>2018-10-15T20:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation referencing a null decimal question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784010#M6791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katherine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selected() calculation only works on the select_one or select_multiple question types.&amp;nbsp; For a decimal it is better to look at the length of the response.&amp;nbsp; For example: if(string-length(${WTEMP_NUM})&amp;gt;0,'','None').&amp;nbsp; This will look at the length of the response for your field ${WTEMP_NUM} and if it is greater than 0 i.e. filled in with anything it will give you a blank response '' but if it is not filled it will return the work None.&amp;nbsp;A variation of this&amp;nbsp;should also work in your relevancy statements as well.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 09:06:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784010#M6791</guid>
      <dc:creator>IngridAldridge1</dc:creator>
      <dc:date>2018-10-16T09:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation referencing a null decimal question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784011#M6792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works out well.&amp;nbsp; Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 13:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/784011#M6792</guid>
      <dc:creator>KatherinePadilla</dc:creator>
      <dc:date>2018-10-17T13:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation referencing a null decimal question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/1094727#M36900</link>
      <description>&lt;P&gt;Thanks for posting this James. I am successfully using count-selected for an empty check, however I did find a bug. If the name of the selected option is zero it does not return the appropriate count it returns zero. EG assume ${select_one_question}, choice name: 0, label: 'test', calling function count-selected(${select_one_question}) returns 0 instead of the expected 1.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 22:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-referencing-a-null-decimal/m-p/1094727#M36900</guid>
      <dc:creator>StrathconaBTS</dc:creator>
      <dc:date>2021-09-01T22:36:52Z</dc:date>
    </item>
  </channel>
</rss>

