<?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 Scan feature service to see if email has already been used? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/scan-feature-service-to-see-if-email-has-already/m-p/1257688#M47462</link>
    <description>&lt;P&gt;Posting to see if a workflow is possible, or if any out there have made it work:&lt;/P&gt;&lt;P&gt;I want to ensure that my survey prevents repeat submissions of a particular attribute. An example would be an email - if somebody enters their email and they've already submitted that email, it could produce a warning saying "You've already submitted. Try a different email." and prevent submission. In my case I will have a drop-down list of groups (say Group 1, Group 2.....Group 10). And I only want to accept&amp;nbsp;&lt;EM&gt;one&lt;/EM&gt; survey from each group. So if Group 1 is chosen in the drop-down, but has already been chosen, I want a warning to pop up and prevent submission.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Poking around it looks like the search() appearance could be used to make this happen: specify the URL of the feature service, the field that contains the group information, and, likely incorporating a hidden field not in the feature service, constrain entries to 'if group is found in list of groups, deny submission.'&lt;/P&gt;&lt;P&gt;Anybody out there done this? Are there pre-established workflows?&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 20:23:43 GMT</pubDate>
    <dc:creator>SFM_TravisBott</dc:creator>
    <dc:date>2023-02-13T20:23:43Z</dc:date>
    <item>
      <title>Scan feature service to see if email has already been used?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/scan-feature-service-to-see-if-email-has-already/m-p/1257688#M47462</link>
      <description>&lt;P&gt;Posting to see if a workflow is possible, or if any out there have made it work:&lt;/P&gt;&lt;P&gt;I want to ensure that my survey prevents repeat submissions of a particular attribute. An example would be an email - if somebody enters their email and they've already submitted that email, it could produce a warning saying "You've already submitted. Try a different email." and prevent submission. In my case I will have a drop-down list of groups (say Group 1, Group 2.....Group 10). And I only want to accept&amp;nbsp;&lt;EM&gt;one&lt;/EM&gt; survey from each group. So if Group 1 is chosen in the drop-down, but has already been chosen, I want a warning to pop up and prevent submission.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Poking around it looks like the search() appearance could be used to make this happen: specify the URL of the feature service, the field that contains the group information, and, likely incorporating a hidden field not in the feature service, constrain entries to 'if group is found in list of groups, deny submission.'&lt;/P&gt;&lt;P&gt;Anybody out there done this? Are there pre-established workflows?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 20:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/scan-feature-service-to-see-if-email-has-already/m-p/1257688#M47462</guid>
      <dc:creator>SFM_TravisBott</dc:creator>
      <dc:date>2023-02-13T20:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Scan feature service to see if email has already been used?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/scan-feature-service-to-see-if-email-has-already/m-p/1259186#M47528</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/106199"&gt;@SFM_TravisBott&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use pulldata('@layer') for this workflow. You would have a select_one question with your groups then pass the selected group in the where clause of the pulldata('@layer') syntax to see if a record already exists with that group. If it does use a constraint to return an error, otherwise if it doesn't your constraint won't run and the user will be good to submit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see the Query a Feature Layer sample in Survey123 Connect for some examples that use pullata('@layer'). The sample doesn't show this exact use case but can be derived from the sample.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would suggest returning the objectId field as the check for existence or not, the syntax would be something like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;pulldata("@layer", "getValue", "results.objectId", "&amp;lt;Feature Service URL&amp;gt;, concat("group='", ${group}, "'"))&lt;/P&gt;&lt;P&gt;Your constraint could then be something like string-length(${query})&amp;lt;1&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 00:38:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/scan-feature-service-to-see-if-email-has-already/m-p/1259186#M47528</guid>
      <dc:creator>ZacharySutherby</dc:creator>
      <dc:date>2023-02-17T00:38:06Z</dc:date>
    </item>
  </channel>
</rss>

