<?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: Survey 123 phone number constraint in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241268#M46525</link>
    <description>&lt;P&gt;You can add a constraint to the field. An example that esri gives is setting the constraint column to the following for phone numbers:&lt;/P&gt;&lt;P&gt;string-length(.)&amp;gt;=8 and string-length(.)&amp;lt;=12&lt;/P&gt;&lt;P&gt;You can also use a regex expression. Here's the suggestion from esri for emails for example (it won't let me paste it directly here so here's a screenshot):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AmeWunderle_0-1671043406264.png" style="width: 752px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58576iB3F091A494FDA0A3/image-dimensions/752x62?v=v2" width="752" height="62" role="button" title="AmeWunderle_0-1671043406264.png" alt="AmeWunderle_0-1671043406264.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet&lt;/A&gt;&amp;nbsp;is a link to more information on how to formulate regex expressions&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 18:46:12 GMT</pubDate>
    <dc:creator>AmeWunderle</dc:creator>
    <dc:date>2022-12-14T18:46:12Z</dc:date>
    <item>
      <title>Survey 123 phone number constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241237#M46523</link>
      <description>&lt;P&gt;How can I write a phone number without leading zeros, restricting it to 10 digits, a&lt;SPAN&gt;re there any enhancement plans or constraint field code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;For example: 5555555555&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 18:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241237#M46523</guid>
      <dc:creator>fatihsonmez1</dc:creator>
      <dc:date>2022-12-14T18:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Survey 123 phone number constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241268#M46525</link>
      <description>&lt;P&gt;You can add a constraint to the field. An example that esri gives is setting the constraint column to the following for phone numbers:&lt;/P&gt;&lt;P&gt;string-length(.)&amp;gt;=8 and string-length(.)&amp;lt;=12&lt;/P&gt;&lt;P&gt;You can also use a regex expression. Here's the suggestion from esri for emails for example (it won't let me paste it directly here so here's a screenshot):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AmeWunderle_0-1671043406264.png" style="width: 752px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58576iB3F091A494FDA0A3/image-dimensions/752x62?v=v2" width="752" height="62" role="button" title="AmeWunderle_0-1671043406264.png" alt="AmeWunderle_0-1671043406264.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet&lt;/A&gt;&amp;nbsp;is a link to more information on how to formulate regex expressions&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 18:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241268#M46525</guid>
      <dc:creator>AmeWunderle</dc:creator>
      <dc:date>2022-12-14T18:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Survey 123 phone number constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241303#M46530</link>
      <description>&lt;P&gt;You can also try for the phone number:&amp;nbsp; regex([0-9]{10}) which will limit it to 10 digits not just the string length&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 19:30:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241303#M46530</guid>
      <dc:creator>AmeWunderle</dc:creator>
      <dc:date>2022-12-14T19:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Survey 123 phone number constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241356#M46536</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;I tried but I get an error. I need to write this code in the constraint section, right? By the way, the question is in text format.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Dec 2022 21:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241356#M46536</guid>
      <dc:creator>fatihsonmez1</dc:creator>
      <dc:date>2022-12-14T21:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Survey 123 phone number constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241375#M46538</link>
      <description>&lt;P&gt;sorry, you will need to change the syntax a little. The regular expression (regex) should include a (.,'()') for survey123 constraint so:&lt;/P&gt;&lt;P&gt;regex(.,'^([0-9]{3})(-)([0-9]{3})(-)([0-9]{4})$') if you want dashes&lt;/P&gt;&lt;P&gt;regex(.,'^([0-9]{10})$') if you don't&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 22:19:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241375#M46538</guid>
      <dc:creator>AmeWunderle</dc:creator>
      <dc:date>2022-12-14T22:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Survey 123 phone number constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241379#M46539</link>
      <description>&lt;P&gt;Thank you so much. I think I understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try,&lt;/P&gt;&lt;P&gt;regex(.,'^(?!0)[0-9]{10}$')&amp;nbsp; if you correct syntax?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 22:20:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241379#M46539</guid>
      <dc:creator>fatihsonmez1</dc:creator>
      <dc:date>2022-12-14T22:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Survey 123 phone number constraint</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241381#M46540</link>
      <description>&lt;P&gt;Looks good to me. Test it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 22:27:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey-123-phone-number-constraint/m-p/1241381#M46540</guid>
      <dc:creator>AmeWunderle</dc:creator>
      <dc:date>2022-12-14T22:27:20Z</dc:date>
    </item>
  </channel>
</rss>

