<?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: How to set minimum characters constraints in survey123 connect? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709653#M301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Igor:&lt;/P&gt;&lt;P&gt;Near the bottom of this page:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://opendatakit.org/help/form-design/binding/" title="https://opendatakit.org/help/form-design/binding/"&gt;Open Data Kit » Binding&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find this example &amp;gt;&amp;gt; "Constraints: Answer must between 4 and 10 characters long (inclusive)"&lt;/P&gt;&lt;P&gt;This should answer your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jan 2017 14:38:29 GMT</pubDate>
    <dc:creator>JoeFlannery</dc:creator>
    <dc:date>2017-01-11T14:38:29Z</dc:date>
    <item>
      <title>How to set minimum characters constraints in survey123 connect?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709652#M300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;#Survey123 #minimumcharacters&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2017 12:42:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709652#M300</guid>
      <dc:creator>AdministratorAGOL_ODIMM</dc:creator>
      <dc:date>2017-01-11T12:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to set minimum characters constraints in survey123 connect?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709653#M301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Igor:&lt;/P&gt;&lt;P&gt;Near the bottom of this page:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://opendatakit.org/help/form-design/binding/" title="https://opendatakit.org/help/form-design/binding/"&gt;Open Data Kit » Binding&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find this example &amp;gt;&amp;gt; "Constraints: Answer must between 4 and 10 characters long (inclusive)"&lt;/P&gt;&lt;P&gt;This should answer your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2017 14:38:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709653#M301</guid>
      <dc:creator>JoeFlannery</dc:creator>
      <dc:date>2017-01-11T14:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to set minimum characters constraints in survey123 connect?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709654#M302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe thanks a lot for your reply, but it seems that expression&amp;nbsp;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #ffffff; border: 1px solid #dddddd; font-size: 1.3em; margin: 0px 0px 0px 30px; padding: 2px;"&gt;&lt;SPAN class="" style="color: #008800; background: transparent; border: 0px;"&gt;"string-length(.) &amp;amp;gt;= 4 and string-length(.) &amp;amp;lt;= 10"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;is not working in Survey123 Connect &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;. I'm beginner in editing of XML forms so maybe I missed something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 14:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709654#M302</guid>
      <dc:creator>AdministratorAGOL_ODIMM</dc:creator>
      <dc:date>2017-01-12T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to set minimum characters constraints in survey123 connect?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709655#M303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Igor:&lt;/P&gt;&lt;P&gt;I am a beginner, too, so I am sorry that I cannot provide further guidance to the use of that constraint code. &amp;nbsp;It seems like you might be&amp;nbsp;heading in the right direction with this code, but now it is a matter of trial and error and maybe some good internet searching to find the final answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't this fun? &amp;nbsp;Really - it's fun to be challenged and learn new things.&lt;/P&gt;&lt;P&gt;Good Luck and post back to this thread if you find something that works for you. &amp;nbsp;Others will be interested.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 14:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709655#M303</guid>
      <dc:creator>JoeFlannery</dc:creator>
      <dc:date>2017-01-12T14:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set minimum characters constraints in survey123 connect?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709656#M304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Igor,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe was kind of correct on how to go about it, you do need to use binding however Survey123 goes about it a different way than ODK. You will want to use an input mask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do this in Survey123 Connect fill in the&amp;nbsp; the &lt;STRONG&gt;&lt;EM&gt;body::esri:SurveyMask &lt;/EM&gt;&lt;/STRONG&gt;column (this is the last column in the survey form column x) for your field with the following.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;XXXXxxxxxx &lt;/EM&gt;&lt;/STRONG&gt;the capital 'X' makes the character required lower case 'x' is optional to the maximum number of total digits in your mask (in your case 10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;X,x&lt;/STRONG&gt; will allow any ascii character&lt;/P&gt;&lt;P&gt;if you just want alphabetic characters use &lt;STRONG&gt;A, a&lt;/STRONG&gt; (e.g. AAAAaaaaaa)&lt;/P&gt;&lt;P&gt;numeric characters (0- 9) required = 9, optional = 0 (e.g. 9999000000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the whole list of options and more about input masks can be found here near the bottom of the page:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/esricustomcolumns.htm" title="http://doc.arcgis.com/en/survey123/desktop/create-surveys/esricustomcolumns.htm"&gt;Esri custom columns—Survey123 for ArcGIS | ArcGIS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 19:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709656#M304</guid>
      <dc:creator>BrentKinal1</dc:creator>
      <dc:date>2017-01-12T19:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set minimum characters constraints in survey123 connect?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709657#M305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Both approaches above are valid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #73bd74;"&gt;&lt;TH&gt;Type&lt;/TH&gt;&lt;TH&gt;Name&lt;/TH&gt;&lt;TH&gt;Label&lt;/TH&gt;&lt;TH&gt;Constraint&lt;/TH&gt;&lt;TH&gt;body::esri:inputMask&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;text&lt;/TD&gt;&lt;TD&gt;AssetID&lt;/TD&gt;&lt;TD&gt;Asset ID&lt;/TD&gt;&lt;TD&gt;string-length(.)&amp;gt;4&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;text&lt;/TD&gt;&lt;TD&gt;AssetName&lt;/TD&gt;&lt;TD&gt;Asset Name&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;AAAAaaa&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the pros and cons I see in each:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Using string-length in a constraint&lt;/STRONG&gt;: The syntax is as shown above, but you could also use something like &lt;EM&gt;string-length(${AssetID})&amp;gt;4&lt;/EM&gt;.The period (.) is a shortcut to the value of the question in which the expression evaluates. I like using this approach because it allows you to ensure&amp;nbsp; that the input from the user has at least&amp;nbsp;the minimum number of characters you specify. In the example above four (4). With a constraint like this you could have as many characters as your field allows. By default text questions allow a maximum&amp;nbsp; number of 255 characters.&amp;nbsp; For text type of questions, the expression in your constraint will be evaluated when the user jumps to the next question, and when the user tries to submit the survey. I also like the technique of using constraints because you can customize the warning the end user will get when the expression is violated by using the &lt;EM&gt;constraint_message&lt;/EM&gt; column in the XLSForm.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Using inputMasks&lt;/STRONG&gt;: This was a great suggestion by Brent. A mask like the one in the example above will allow a string with at least 4 characters and optionally up to 3 more characters. I like two things about input masks: first, that the end user gets feedback about the validity of the input as the values are&amp;nbsp; entered. The input will be shown in red until it is valid. For example, while you type the first&amp;nbsp;3 characters the input will be shown in red, but when you reach 4 characters it will turn black indicating that the input is correct.&amp;nbsp; Input masks also have the advantage that let you control the type of text that is accepted according to &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/esricustomcolumns.htm#ESRI_SECTION1_2D9AA8F82B714D7DB922D766E56FF3F6"&gt;this table&lt;/A&gt;.&amp;nbsp; You can for example make the values by all alphanumeric, or just alphabetic&amp;nbsp;, a combination of both etc.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 04:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709657#M305</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2017-01-13T04:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to set minimum characters constraints in survey123 connect?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709658#M306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3966"&gt;Ismael Chivite&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;If I follow what you say above then the above constraint should work when {MATERIALS_USED} = YES and QUANTITY1 has no value. However, using a spinner on an integer results in an initial value of 'null' meaning the constraint never fires.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="428132" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/428132_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="428133" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/428133_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've highlighted this in a similar thread &lt;A _jive_internal="true" href="https://community.esri.com/message/799138-re-can-relevant-field-be-dependent-on-if-condition-is-not-null?commentID=799138#comment-799138"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 21:04:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-set-minimum-characters-constraints-in/m-p/709658#M306</guid>
      <dc:creator>AndrewHargreaves2</dc:creator>
      <dc:date>2018-11-08T21:04:10Z</dc:date>
    </item>
  </channel>
</rss>

