<?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: Constraint: No Line Feed in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794884#M9205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using regex is definitely the way to go. As I posted in a &lt;A _jive_internal="true" href="https://community.esri.com/thread/228140-when-a-return-is-used-in-a-text-field-in-survey123-the-subsequent-multi-line-text-appears-to-be-missing-in-the-attribute-table"&gt;similar thread&lt;/A&gt;, you can use the following expression in the &lt;SPAN style="text-decoration: underline;"&gt;constraint&lt;/SPAN&gt; column: &lt;STRONG&gt;not(regex(., '\n'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested this a bit in another survey and it seems to work well at preventing any line breaks. Just make sure you provide a descriptive constraint message so that users understand what's going on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2019 14:19:57 GMT</pubDate>
    <dc:creator>NickDierks1</dc:creator>
    <dc:date>2019-03-19T14:19:57Z</dc:date>
    <item>
      <title>Constraint: No Line Feed</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794880#M9201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was hoping to put in a constraint for all my text questions with the&amp;nbsp;multiline appearance that will not allow a line feed (ie does not allow the user to hit enter and create a new line rather the user must use one continuous line with spaces and punctuation).&amp;nbsp; I am not well educated in coding and cannot figure out using the regular expressions documentation.&amp;nbsp; Any ideas on how I can accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I do not want:&lt;/P&gt;&lt;P&gt;"Apple&lt;/P&gt;&lt;P&gt;Banana&lt;/P&gt;&lt;P&gt;Pear"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I do want:&lt;/P&gt;&lt;P&gt;"Apple, Banana, Pear"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2019 22:36:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794880#M9201</guid>
      <dc:creator>KatherinePadilla</dc:creator>
      <dc:date>2019-03-12T22:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint: No Line Feed</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794881#M9202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katherine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't believe this is possible using a constraint or input mask. If you do not want users to use the multiline appearance as it is intended (to create line feeds or carriage returns in a single text box), I would suggest you use a text question type without multiline appearance so it appears in the survey as a single line text box and l&lt;SPAN&gt;ine feeds or carriage returns can not be used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Phil.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2019 23:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794881#M9202</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-03-12T23:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint: No Line Feed</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794882#M9203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; Is there any way that I could add an intermediate question that can return a&amp;nbsp;number &amp;gt;=1 for the number of&amp;nbsp;line feeds found or&amp;nbsp;0 if no&amp;nbsp;line feed is found.&amp;nbsp; If so then I can put a constraint on that question that it must be 0.&amp;nbsp; This can accomplish what I would like.&amp;nbsp; I would just need to know what expression to use to search for the line feed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 13:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794882#M9203</guid>
      <dc:creator>KatherinePadilla</dc:creator>
      <dc:date>2019-03-13T13:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint: No Line Feed</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794883#M9204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katherine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the regex expression you would need to use in&amp;nbsp;a constraint to find line breaks would need to include a \n or \r search which represent line breaks or carriage returns. You can find more info here about using regex in Survey123:&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_8979CBF8B7354DA9A4FE0F6B6D61E1A0" title="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_8979CBF8B7354DA9A4FE0F6B6D61E1A0"&gt;Formulas—Survey123 for ArcGIS | ArcGIS&lt;/A&gt;&amp;nbsp;and here is some more info on regex parameters &lt;A class="link-titled" href="https://www.rexegg.com/regex-quickstart.html#whitespace" title="https://www.rexegg.com/regex-quickstart.html#whitespace"&gt;Regex Cheat Sheet&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tested this myself, but have a play around and hopefully you can get it working the way you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 21:57:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794883#M9204</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-03-13T21:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint: No Line Feed</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794884#M9205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using regex is definitely the way to go. As I posted in a &lt;A _jive_internal="true" href="https://community.esri.com/thread/228140-when-a-return-is-used-in-a-text-field-in-survey123-the-subsequent-multi-line-text-appears-to-be-missing-in-the-attribute-table"&gt;similar thread&lt;/A&gt;, you can use the following expression in the &lt;SPAN style="text-decoration: underline;"&gt;constraint&lt;/SPAN&gt; column: &lt;STRONG&gt;not(regex(., '\n'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested this a bit in another survey and it seems to work well at preventing any line breaks. Just make sure you provide a descriptive constraint message so that users understand what's going on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 14:19:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794884#M9205</guid>
      <dc:creator>NickDierks1</dc:creator>
      <dc:date>2019-03-19T14:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint: No Line Feed</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794885#M9206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This has worked out great for us, exactly what I was looking for!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Katie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2019 14:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-no-line-feed/m-p/794885#M9206</guid>
      <dc:creator>KatherinePadilla</dc:creator>
      <dc:date>2019-03-21T14:53:28Z</dc:date>
    </item>
  </channel>
</rss>

