<?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: Text Constraints for Survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877069#M29529</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a particular concern about allowing text with single/double quotes be submitted? &amp;nbsp;The most likely concerns relate to escaping text to attempt to cause unwanted DBMS behavior. &amp;nbsp;ArcGIS Online and Enterprise normally address these concerns through the use of&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm" title="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm"&gt;Standardized SQL functions in ArcGIS Online—ArcGIS Online Help | ArcGIS&lt;/A&gt;&amp;nbsp;and other sanitizing procedures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test for the presence of a quotation mark (or any other character) through the use of a regex() function; to invalidate for single or double quotes you would want the following function in your constraint:&lt;/P&gt;&lt;P&gt;not(regex('"|\x27'))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this will also catch the use of ' as a possessive marker or contraction marker as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wanted to replace the single/double quotes, then you would need to use a custom JS function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2019 17:50:03 GMT</pubDate>
    <dc:creator>JamesTedrick</dc:creator>
    <dc:date>2019-03-14T17:50:03Z</dc:date>
    <item>
      <title>Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877068#M29528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wanting to not let users enter any quotes, single or double and then replace that with either brackets specifying what was omitted. Ex: if user enters "My name is Joe" the output should be (dbl quote) My name is Joe (dbl quote)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 16:37:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877068#M29528</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2019-03-13T16:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877069#M29529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a particular concern about allowing text with single/double quotes be submitted? &amp;nbsp;The most likely concerns relate to escaping text to attempt to cause unwanted DBMS behavior. &amp;nbsp;ArcGIS Online and Enterprise normally address these concerns through the use of&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm" title="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm"&gt;Standardized SQL functions in ArcGIS Online—ArcGIS Online Help | ArcGIS&lt;/A&gt;&amp;nbsp;and other sanitizing procedures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test for the presence of a quotation mark (or any other character) through the use of a regex() function; to invalidate for single or double quotes you would want the following function in your constraint:&lt;/P&gt;&lt;P&gt;not(regex('"|\x27'))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this will also catch the use of ' as a possessive marker or contraction marker as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wanted to replace the single/double quotes, then you would need to use a custom JS function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2019 17:50:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877069#M29529</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2019-03-14T17:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877070#M29530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My workflow involves Integromat which pushes to a feature service using JSON and REST. Because of JSON syntax, all of my dynamic data (which is passed in from a survey webhook) must be enclosed in double quotes. Since one of my data pieces that user enters in the survey is a textbox, there is a chance that double quotes could be entered which could throw off the JSON syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a sample JSON response of mine:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[
{"attributes" : 
{"OBJECTID" :268,
"Terracon_Comments" :"This is a sample comment which may include "double quotes""
}
}
]

My goal is to allow the user the enter double quotes and not throw off JSON.
Integromt doesn't seem to recognize JSON escaping (or I'm doing it wrong)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:00:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877070#M29530</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2021-12-12T11:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877071#M29531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that situation, I would use either Integromat's encodeURL or replace functions to substitute the quotation marks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2019 20:48:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877071#M29531</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2019-03-14T20:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877072#M29532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will encoding throw off the JSON syntax or REST?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:27:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877072#M29532</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2019-03-15T13:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877073#M29533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the destination web service, you may need to decode the text, but they may also happen automatically depending on the framework you are using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2019 20:51:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877073#M29533</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2019-03-15T20:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877074#M29534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm pushing the data to an ESRI feature service. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2019 21:21:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877074#M29534</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2019-03-15T21:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877075#M29535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will the ESRI service automatically decode this? I'm just trying to pass into a ESRI service using REST&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 21:19:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877075#M29535</guid>
      <dc:creator>joerodmey</dc:creator>
      <dc:date>2019-03-18T21:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Text Constraints for Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877076#M29536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it should be able to automatically handle an encoded URL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 18:18:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/text-constraints-for-survey123/m-p/877076#M29536</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2019-03-19T18:18:09Z</dc:date>
    </item>
  </channel>
</rss>

