<?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 XLSForm Issue - Bad Node in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850906#M23402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Hello!&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;I created a Survey123 xlsform. for those who may be unaware, using and XLSform based survey in the Survey123 app acts much differently than opening the same survey in a browser.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;within the app i had originally written a calculation:&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;if(${practice}="Cover Crop (340)(acres)",round(pulldata('covercrops','phosphorus','county',${county})&lt;EM&gt;${costshareac},2),if(${practice}="Conservation Cover (327)(acres)",round(pulldata('grassedpractices','phosphorus','county',${county})&lt;/EM&gt;${costshareac},2),if(${practice}="Critical Area Planting (342) (acres)",round(pulldata('grassedpractices','phosphorus','county',${county})&lt;EM&gt;${costshareac},2),if(${practice}="Filter Strip (393)(acres)",round(pulldata('grassedpractices','phosphorus','county',${county})&lt;/EM&gt;${costshareac},2),""))))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;This worked great in the app - I am referencing some CSVs (grassedpractices.csv, covercrops.csv) in this formula. You'll notice there are multiple if statements here.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;To make this work well on a browser, I had to move the pulldata into new calculation rows and then call them. Below is my workaround:&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;This works fine (s_1):&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;if(${practice}="Cover Crop (340)(acres)",${s_cov},0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;(s_cov):&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;pulldata('covercrops','sediment','county',${county})*${costshareac}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;THIS is where things get weird - If I try to apply this to multiple "if" statements then we run into some problems.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Example (s_2):&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;if(${practice}="Cover Crop (340)(acres)",${s_gp},0),if(${practice}="Conservation Cover (327)(acres)",${s_gp},0),if(${practice}="Critical Area Planting (342) (acres)",${s_gp},0),if(${practice}="Filter Strip (393)(acres)",${s_gp},0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;when I try to string them together like I did before I recieve an XFormParseException error indicating a Bad node.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;(s_gp) referenced in above formula:&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;pulldata('grassedpractices','sediment','county',${county})*${costshareac}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Error:&lt;/P&gt;&lt;DIV class="" style="color: #222222; background-color: #ffffff;"&gt;&lt;A data-download-href="https://opendatakit-a3b1.kxcdn.com/uploads/default/640fdf363b05d5ae837eb3adacec2b3db458daf3" href="https://opendatakit-a3b1.kxcdn.com/uploads/default/original/2X/6/640fdf363b05d5ae837eb3adacec2b3db458daf3.png" rel="nofollow noopener" style="color: #0088cc; background: transparent; text-decoration: none;" title="XLSerror"&gt;&lt;IMG alt="XLSerror" data-base62-sha1="ehbKEwTvlZixygKgcRziNAdooIr" data-small-upload="https://opendatakit-a3b1.kxcdn.com/uploads/default/optimized/2X/6/640fdf363b05d5ae837eb3adacec2b3db458daf3_2_10x10.png" height="122" src="https://opendatakit-a3b1.kxcdn.com/uploads/default/optimized/2X/6/640fdf363b05d5ae837eb3adacec2b3db458daf3_2_690x122.png" style="border: 0px;" width="690" /&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;any obvious issues?&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="font-weight: bold;"&gt;2. What app or server are you using and on what device and operating system? Include version numbers.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Survey123 - Web Browser (tested in Chrome, Firefox, and Edge).&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Windows 10, excel 2013, survey123 connect for ArcGIS 3.5&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="font-weight: bold;"&gt;So far I've tried&lt;/STRONG&gt;&lt;BR /&gt;-nesting the if statements, but it doesn't accomplish what I need.&lt;BR /&gt;-moving the pulldata rows above the if calculations&lt;BR /&gt;-creating a new row for each "if" (this works, but seems untidy and silly)&lt;BR /&gt;-changing the "type" to "hidden" and "decimal" rather than "calculate"&lt;BR /&gt;-putting many things in and out of parenthesis&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="font-weight: bold;"&gt;Additionally:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;I'm not attaching the form itself for privacy sake (certain choices), but if you really must have it I can make version that is gleaned of this information.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Thank you!&lt;BR /&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Feb 2020 22:16:23 GMT</pubDate>
    <dc:creator>TrevorLaureys</dc:creator>
    <dc:date>2020-02-12T22:16:23Z</dc:date>
    <item>
      <title>XLSForm Issue - Bad Node</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850906#M23402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Hello!&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;I created a Survey123 xlsform. for those who may be unaware, using and XLSform based survey in the Survey123 app acts much differently than opening the same survey in a browser.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;within the app i had originally written a calculation:&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;if(${practice}="Cover Crop (340)(acres)",round(pulldata('covercrops','phosphorus','county',${county})&lt;EM&gt;${costshareac},2),if(${practice}="Conservation Cover (327)(acres)",round(pulldata('grassedpractices','phosphorus','county',${county})&lt;/EM&gt;${costshareac},2),if(${practice}="Critical Area Planting (342) (acres)",round(pulldata('grassedpractices','phosphorus','county',${county})&lt;EM&gt;${costshareac},2),if(${practice}="Filter Strip (393)(acres)",round(pulldata('grassedpractices','phosphorus','county',${county})&lt;/EM&gt;${costshareac},2),""))))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;This worked great in the app - I am referencing some CSVs (grassedpractices.csv, covercrops.csv) in this formula. You'll notice there are multiple if statements here.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;To make this work well on a browser, I had to move the pulldata into new calculation rows and then call them. Below is my workaround:&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;This works fine (s_1):&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;if(${practice}="Cover Crop (340)(acres)",${s_cov},0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;(s_cov):&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;pulldata('covercrops','sediment','county',${county})*${costshareac}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;THIS is where things get weird - If I try to apply this to multiple "if" statements then we run into some problems.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Example (s_2):&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;if(${practice}="Cover Crop (340)(acres)",${s_gp},0),if(${practice}="Conservation Cover (327)(acres)",${s_gp},0),if(${practice}="Critical Area Planting (342) (acres)",${s_gp},0),if(${practice}="Filter Strip (393)(acres)",${s_gp},0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;when I try to string them together like I did before I recieve an XFormParseException error indicating a Bad node.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;(s_gp) referenced in above formula:&lt;/P&gt;&lt;BLOCKQUOTE style="color: #222222; background-color: #f9f9f9; border-left: 5px solid #e9e9e9; padding: 12px;"&gt;&lt;P style="margin-top: 0px !important; margin-bottom: 0px !important;"&gt;pulldata('grassedpractices','sediment','county',${county})*${costshareac}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Error:&lt;/P&gt;&lt;DIV class="" style="color: #222222; background-color: #ffffff;"&gt;&lt;A data-download-href="https://opendatakit-a3b1.kxcdn.com/uploads/default/640fdf363b05d5ae837eb3adacec2b3db458daf3" href="https://opendatakit-a3b1.kxcdn.com/uploads/default/original/2X/6/640fdf363b05d5ae837eb3adacec2b3db458daf3.png" rel="nofollow noopener" style="color: #0088cc; background: transparent; text-decoration: none;" title="XLSerror"&gt;&lt;IMG alt="XLSerror" data-base62-sha1="ehbKEwTvlZixygKgcRziNAdooIr" data-small-upload="https://opendatakit-a3b1.kxcdn.com/uploads/default/optimized/2X/6/640fdf363b05d5ae837eb3adacec2b3db458daf3_2_10x10.png" height="122" src="https://opendatakit-a3b1.kxcdn.com/uploads/default/optimized/2X/6/640fdf363b05d5ae837eb3adacec2b3db458daf3_2_690x122.png" style="border: 0px;" width="690" /&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;any obvious issues?&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="font-weight: bold;"&gt;2. What app or server are you using and on what device and operating system? Include version numbers.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Survey123 - Web Browser (tested in Chrome, Firefox, and Edge).&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Windows 10, excel 2013, survey123 connect for ArcGIS 3.5&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="font-weight: bold;"&gt;So far I've tried&lt;/STRONG&gt;&lt;BR /&gt;-nesting the if statements, but it doesn't accomplish what I need.&lt;BR /&gt;-moving the pulldata rows above the if calculations&lt;BR /&gt;-creating a new row for each "if" (this works, but seems untidy and silly)&lt;BR /&gt;-changing the "type" to "hidden" and "decimal" rather than "calculate"&lt;BR /&gt;-putting many things in and out of parenthesis&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="font-weight: bold;"&gt;Additionally:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;I'm not attaching the form itself for privacy sake (certain choices), but if you really must have it I can make version that is gleaned of this information.&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; background-color: #ffffff;"&gt;Thank you!&lt;BR /&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2020 22:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850906#M23402</guid>
      <dc:creator>TrevorLaureys</dc:creator>
      <dc:date>2020-02-12T22:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: XLSForm Issue - Bad Node</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850907#M23403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;if(${practice}=${grassedpractice},${s_gp},"")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a new choice and referenced it rather than putting a "quoted text" in as a cursor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 18:51:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850907#M23403</guid>
      <dc:creator>TrevorLaureys</dc:creator>
      <dc:date>2020-02-13T18:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: XLSForm Issue - Bad Node</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850908#M23404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Trevor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be helpful if you could share the XLSFile to diagnose this. &amp;nbsp;Also, just to check - the statement in you XLSFile has the appropriate number of closing parenthesis? &amp;nbsp;It seems a few are missing form your copy/paste.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 22:46:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850908#M23404</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2020-02-19T22:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: XLSForm Issue - Bad Node</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850909#M23405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Turns out all I needed was an appropriate nested-if statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/491859_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to find some help on the ODK forum - and I'm sharing here in case someone else runs into a similar problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2020 15:55:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/xlsform-issue-bad-node/m-p/850909#M23405</guid>
      <dc:creator>TrevorLaureys</dc:creator>
      <dc:date>2020-05-12T15:55:26Z</dc:date>
    </item>
  </channel>
</rss>

