<?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 Conditional Constraint Not Working as Expected in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/conditional-constraint-not-working-as-expected/m-p/1242801#M46628</link>
    <description>&lt;P&gt;I have built a survey to track work performed for a group within an organization.&amp;nbsp; Initially, the survey required that the information entered must equal at least 8 hours of work; however, since this group often participates in overtime work, this constraint was not workable in all scenarios.&amp;nbsp; To account for situations where work is completed outside of the normal workday, and may acceptably not be 8 hours, I added another question to the survey to distinguish overtime events from normal workday events.&amp;nbsp; I then modified my initial constraint to the following:&lt;/P&gt;&lt;P&gt;if(selected(${OvertimeEvent},'no'), (${TotalHours}&amp;gt;=8), '')&lt;/P&gt;&lt;P&gt;The survey validates with no errors but fails operationally.&amp;nbsp; When I indicate 'yes' for an Overtime Event and enter a value less than 8 hours, I am unable to submit the survey.&lt;/P&gt;&lt;P&gt;How can I modify the survey so that I am able to submit when my total hours are less than 8 only if I have indicated it is an overtime event?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2022 21:07:52 GMT</pubDate>
    <dc:creator>LouiseHahn_GIS</dc:creator>
    <dc:date>2022-12-20T21:07:52Z</dc:date>
    <item>
      <title>Conditional Constraint Not Working as Expected</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/conditional-constraint-not-working-as-expected/m-p/1242801#M46628</link>
      <description>&lt;P&gt;I have built a survey to track work performed for a group within an organization.&amp;nbsp; Initially, the survey required that the information entered must equal at least 8 hours of work; however, since this group often participates in overtime work, this constraint was not workable in all scenarios.&amp;nbsp; To account for situations where work is completed outside of the normal workday, and may acceptably not be 8 hours, I added another question to the survey to distinguish overtime events from normal workday events.&amp;nbsp; I then modified my initial constraint to the following:&lt;/P&gt;&lt;P&gt;if(selected(${OvertimeEvent},'no'), (${TotalHours}&amp;gt;=8), '')&lt;/P&gt;&lt;P&gt;The survey validates with no errors but fails operationally.&amp;nbsp; When I indicate 'yes' for an Overtime Event and enter a value less than 8 hours, I am unable to submit the survey.&lt;/P&gt;&lt;P&gt;How can I modify the survey so that I am able to submit when my total hours are less than 8 only if I have indicated it is an overtime event?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 21:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/conditional-constraint-not-working-as-expected/m-p/1242801#M46628</guid>
      <dc:creator>LouiseHahn_GIS</dc:creator>
      <dc:date>2022-12-20T21:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Constraint Not Working as Expected</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/conditional-constraint-not-working-as-expected/m-p/1242814#M46631</link>
      <description>&lt;P&gt;Since TotalHours is a note field 123 will treat it as text in the form.&amp;nbsp; Set&amp;nbsp;bind::type to int or decimal and see if that does it.&lt;/P&gt;&lt;P&gt;Also I think constraint needs a true but '' is false so do this since 1 is a true.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(selected(${OvertimeEvent},'no'), ${TotalHours} &amp;gt;= 8, 1)&lt;/P&gt;&lt;P&gt;hope that does it&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 21:31:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/conditional-constraint-not-working-as-expected/m-p/1242814#M46631</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-12-20T21:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Constraint Not Working as Expected</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/conditional-constraint-not-working-as-expected/m-p/1242838#M46633</link>
      <description>&lt;P&gt;Doug!!&amp;nbsp; That did it!&amp;nbsp; After testing, the setting of the bind::type didn't seem to make a difference.&amp;nbsp; I just needed to use 1 as my if false value instead of ''.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&amp;nbsp; And so quickly!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 22:14:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/conditional-constraint-not-working-as-expected/m-p/1242838#M46633</guid>
      <dc:creator>LouiseHahn_GIS</dc:creator>
      <dc:date>2022-12-20T22:14:03Z</dc:date>
    </item>
  </channel>
</rss>

