<?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: New Error class java.lang.Double cannot be cast to class java. lang. String in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/new-error-class-java-lang-double-cannot-be-cast-to/m-p/1104756#M37831</link>
    <description>&lt;P&gt;Deon. Thank you for taking the time to look at my survey and sending me back an improved example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the advice about copying into a text file and I try to do that, but that expression had been copied and pasted so many times I am not surprised something went out of whack.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks also for the tip about bind:type&lt;/P&gt;&lt;P&gt;Every time I do a project with Survey123 I learn something new.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2021 14:02:54 GMT</pubDate>
    <dc:creator>ShariForbes</dc:creator>
    <dc:date>2021-10-05T14:02:54Z</dc:date>
    <item>
      <title>New Error class java.lang.Double cannot be cast to class java. lang. String</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/new-error-class-java-lang-double-cannot-be-cast-to/m-p/1104038#M37769</link>
      <description>&lt;P&gt;Hello. A few days ago our calculation to prepopulate a field based on the default of another field and worked fine but now we get that java error that I don't fully comprehend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For ProjectNo X, fill in Project Address, like follows.&lt;/P&gt;&lt;P&gt;if(selected(${ProjectNo}, '1'), '783 Antoine Dr', if(selected(${ProjectNo}, '2'), '860 Acadia Dr’, if(selected(${ProjectNo}, '3'), '770 Andre Ct’, if(selected(${ProjectNo}, '4'), '860 Cambridge Dr’, if(selected(${ProjectNo}, '5'), '868 Cambridge Dr’, if(selected(${ProjectNo}, '6'), '812 Grand Teton Dr’, if(selected(${ProjectNo}, '7'), '929 Grand Teton Dr’, if(selected(${ProjectNo}, '8'), '3321 Nice Dr’, if(selected(${ProjectNo}, '9'), '784 Noel Trl’, if(selected(${ProjectNo}, '10'), '768 Pierre Ln’, if(selected(${ProjectNo}, '11'), '804 Rushmore Ln’, if(selected(${ProjectNo}, '12'), '753 Warwick Dr’, if(selected(${ProjectNo}, '13'), '3301 Thunderbird Ln’, ‘Please choose a project number’)))))))))))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached my .xls form too. Appreciate any advice.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 18:09:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/new-error-class-java-lang-double-cannot-be-cast-to/m-p/1104038#M37769</guid>
      <dc:creator>ShariForbes</dc:creator>
      <dc:date>2021-10-01T18:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: New Error class java.lang.Double cannot be cast to class java. lang. String</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/new-error-class-java-lang-double-cannot-be-cast-to/m-p/1104328#M37796</link>
      <description>&lt;P&gt;Hi Shari&lt;/P&gt;&lt;P&gt;I found a few issues in your survey. Your &lt;STRONG&gt;&lt;EM&gt;if&lt;/EM&gt;&lt;/STRONG&gt; statement contains inconsistent single quotes - some of them seem to have been copied from Word so they have a different format. I usually copy those text blocks into Notepad to get rid of any special characters and then copy it from there into my Excel sheets.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DeonLengton_0-1633336062792.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24441i684586A90E0378AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DeonLengton_0-1633336062792.png" alt="DeonLengton_0-1633336062792.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I do however suspect the biggest problem was that ProjectNo is defined as an integer and the selected() function compares it to a String value. I would change the bind::type for ProjectNo to string it should fix your survey:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DeonLengton_1-1633336148075.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24442i0C99C196F69886D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DeonLengton_1-1633336148075.png" alt="DeonLengton_1-1633336148075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;bind::type changes the way Survey123 looks at your field in survey calculations such as selected()&lt;/P&gt;&lt;P&gt;I have attached a working Excel design file for your survey.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 08:31:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/new-error-class-java-lang-double-cannot-be-cast-to/m-p/1104328#M37796</guid>
      <dc:creator>DeonLengton</dc:creator>
      <dc:date>2021-10-04T08:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: New Error class java.lang.Double cannot be cast to class java. lang. String</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/new-error-class-java-lang-double-cannot-be-cast-to/m-p/1104756#M37831</link>
      <description>&lt;P&gt;Deon. Thank you for taking the time to look at my survey and sending me back an improved example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the advice about copying into a text file and I try to do that, but that expression had been copied and pasted so many times I am not surprised something went out of whack.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks also for the tip about bind:type&lt;/P&gt;&lt;P&gt;Every time I do a project with Survey123 I learn something new.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 14:02:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/new-error-class-java-lang-double-cannot-be-cast-to/m-p/1104756#M37831</guid>
      <dc:creator>ShariForbes</dc:creator>
      <dc:date>2021-10-05T14:02:54Z</dc:date>
    </item>
  </channel>
</rss>

