<?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: IF Statement Priority Dependency Cycle in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365888#M53729</link>
    <description>&lt;P&gt;Last question in regards to this, is it possible to have the calculation overwrite / update without having to use the refresh button? I am using "autocomplete" but I am opening this survey via inbox method which I think might have something to do with it. It's not the end of the world to have to click the refresh button occasionally, but was curious if you knew any fixes to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adam_Bourque_0-1704302283120.png" style="width: 665px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90410iF08CDF1A09FF7A6C/image-dimensions/665x93?v=v2" width="665" height="93" role="button" title="Adam_Bourque_0-1704302283120.png" alt="Adam_Bourque_0-1704302283120.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 17:18:21 GMT</pubDate>
    <dc:creator>Adam_Bourque</dc:creator>
    <dc:date>2024-01-03T17:18:21Z</dc:date>
    <item>
      <title>IF Statement Priority Dependency Cycle</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365621#M53710</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Is it possible to use two different fields to generate values and have one field be priority / overwrite?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using an IF statement that looks at two previous fields to determine if water service line needs replaced based on bothsidestatus. That part works fine; however, I am wanting the "length(${scheddate}&amp;gt;0 Scheduled Replacement" to overwrite / or take priority over the bothsidestatus.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In better words, if the user schedules a replacement date in either utility or customer side with this schedule date field, I want the calculation to show the status as "Scheduled Replacement" rather than "Still Identifying Material Types / Needs Replaced / Doesn't Need Replaced" options. I tried to move the string-length option to the front of the calculation but kept getting the error "If statement needs 3 conditions, and you only have 1 condition".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Calculation:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(${bothsidesstatus}='Unknown' , "Still Identifying Material Types", if(${bothsidesstatus}='Non-Lead' , "Doesn't Need Replacement", if(${bothsidesstatus}='Galvanized Requiring Replacement', "Needs Replacement", if(${bothsidesstatus}='Lead', "Needs Replacement", if(string-length(${custscheddate}&amp;gt;0 or if(string-length(${scheddate}&amp;gt;0, "Scheduled Replacement", "Still Identifying Material Types"))))))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, if you need a copy of my survey or anything else please let me know&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 22:12:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365621#M53710</guid>
      <dc:creator>Adam_Bourque</dc:creator>
      <dc:date>2024-01-02T22:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement Priority Dependency Cycle</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365626#M53711</link>
      <description>&lt;P&gt;This part here you would not have two if statements the or will be enough.&lt;/P&gt;&lt;P&gt;if(string-length(${custscheddate}&amp;gt;0 or if(string-length(${scheddate}&amp;gt;0,&lt;/P&gt;&lt;P&gt;Change to&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(string-length(${custscheddate}&amp;gt;0 or string-length(${scheddate}&amp;gt;0,&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 22:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365626#M53711</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-01-02T22:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement Priority Dependency Cycle</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365753#M53716</link>
      <description>&lt;P&gt;Awesome&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;&amp;nbsp;you definitely solved that part of my situation, true MVP; however, the code still prioritizes the Unknown - Still identifying materials option because it is first in the equation. When I try to put the string length cust schedule date option first like here I still get the "Only 1 provided of 3 statements S123". If I put it last in the order like my existing code with the fixed code, still does not "overwrite" prioritize which I guess makes sense given the order. Not sure why it is still being picky at the code below, any additional work around? Maybe I will need to implement a repeat field or something if this doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for spending the time to help us out here at the forums.&lt;/P&gt;&lt;P&gt;if(string-length(${custscheddate}&amp;gt;0 or string-length(${scheddate}&amp;gt;0, "Scheduled Replacement", if(${bothsidesstatus}='Unknown' , "Still Identifying Material Types", if(${bothsidesstatus}='Non-Lead' , "Doesn't Need Replacement", if(${bothsidesstatus}='Galvanized Requiring Replacement', "Needs Replacement", if(${bothsidesstatus}='Lead', "Needs Replacement", "Still Identifying Material Types")))))))&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 13:50:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365753#M53716</guid>
      <dc:creator>Adam_Bourque</dc:creator>
      <dc:date>2024-01-03T13:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement Priority Dependency Cycle</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365767#M53719</link>
      <description>&lt;P&gt;You have some syntax errors still here.&amp;nbsp; Its string-length() you are missing the )&amp;nbsp; Lets try&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(string-length(${custscheddate}) &amp;gt; 0 or string-length(${scheddate}) &amp;gt; 0, "Scheduled Replacement", if(${bothsidesstatus}='Unknown' , "Still Identifying Material Types", if(${bothsidesstatus}='Non-Lead' , "Doesn't Need Replacement", if(${bothsidesstatus}='Galvanized Requiring Replacement', "Needs Replacement", if(${bothsidesstatus}='Lead', "Needs Replacement", "Still Identifying Material Types")))))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 14:52:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365767#M53719</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-01-03T14:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement Priority Dependency Cycle</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365839#M53723</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;&amp;nbsp;I thought about the syntax / putting parenthesis bracket, but have been spoiled at always putting them at the very end. This opens up more avenues for surveys,&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 15:53:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365839#M53723</guid>
      <dc:creator>Adam_Bourque</dc:creator>
      <dc:date>2024-01-03T15:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement Priority Dependency Cycle</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365888#M53729</link>
      <description>&lt;P&gt;Last question in regards to this, is it possible to have the calculation overwrite / update without having to use the refresh button? I am using "autocomplete" but I am opening this survey via inbox method which I think might have something to do with it. It's not the end of the world to have to click the refresh button occasionally, but was curious if you knew any fixes to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adam_Bourque_0-1704302283120.png" style="width: 665px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90410iF08CDF1A09FF7A6C/image-dimensions/665x93?v=v2" width="665" height="93" role="button" title="Adam_Bourque_0-1704302283120.png" alt="Adam_Bourque_0-1704302283120.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 17:18:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365888#M53729</guid>
      <dc:creator>Adam_Bourque</dc:creator>
      <dc:date>2024-01-03T17:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement Priority Dependency Cycle</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365895#M53730</link>
      <description>&lt;P&gt;If from Inbox then no since it counts as you editing.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 17:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-priority-dependency-cycle/m-p/1365895#M53730</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-01-03T17:24:10Z</dc:date>
    </item>
  </channel>
</rss>

