Skip navigation
All Places > ArcGIS Survey123 > Blog > 2020 > May
2020

The Survey123 Early Adopter Community (EAC) helps you access the latest Beta builds of the software. You can sign in with your existing Esri account and gain access to software downloads, documentation on upcoming features and discussion forums.

 

We have just updated EAC with new Beta versions of Survey123. You can test the Survey123 website, web app, field app and Survey123 Connect across all supported platforms. Below is a list of some of the Beta features available for testing:

 

As a general rule, we prefer feedback regarding our Beta releases through the Early Adopter Community Forums. We like to keep discussions in GeoNet for the released version of the software. Keeping things separate avoids potential confusion.

 

One question, many photos

 

Configure image questions in your Survey123 forms to allow end users to associate multiple photos with it. Below is a screenshot of Survey123 designer, showing the new options we added to give you more control.

 

 

If using Survey123 Connect, you can now apply the multiline appearance to your image questions to support capturing multiple photos. You can also use XLSForm functions such as count-selected() against image questions in your calculations, constraint and relevant columns. This allows you to do things like: store the photo count as a GIS attribute along with the record, force users to take a minimum and a maximum of photos, etc.

 

We want to make this feature available in our July update. Waiting for your last word! More info for Connect users here, and for designer here.

 

Map enhancements in Survey123 Connect

 

Survey123 Connect now lets you easily configure maps in your survey so you can use your own web maps, mobile map packages, offline map areas, etc. You can also use extended XLSForm syntax to control exactly what each of the maps in your survey will show. A new Linked Content section allows you to browser for existing maps in your organization, so end users of your survey can easily access them from the app.

 

 

All of this may already be somewhat familiar to you because the released software has this feature flagged as Beta.

 Your feedback is important now more than ever as this is ready to be shipping in July. Learn about this feature and more mapping enhancements here.

 

Survey123 organizational settings

 

A collection of Survey123 organizational settings can now be controlled by ArcGIS administrators. Use them to help users and Survey123 authors be more effective and bring consistency to your organization. You can access these settings from the Survey123 website when you are logged with a user with administration privileges.  As shown in the screenshot below, there are a number of settings available.

 


Summary reports

 

Do you wish to create a report template including a table for all records, or a selection set in your survey layer? Do you also want to add statistics for these records? Then it will be worth learning about the extended report template syntax.  Find all the details here.

 

Custom JavaScript functions and pulldata()

 

This is for advanced XLSForm ninjas only. Invoke a custom JavaScript function using the pulldata() XLSForm function. This allows you to model complex logic in JavaScript syntax that would be difficult to express in XLSForms (or not even possible). You can check for duplicate values in repeats, lookup values from web services, perform point in polygon queries and much more. 

 

While this capability has been available in the Early Adopter Program for quite some time, we are now aiming to release it in July 2020.  We made quite a few enhancements in Survey123 Connect to help you test your JavaScript functions and also enabled execution of your own code in the Survey123 web app too.  More info here.

 

Survey123 website installer

 

The Windows installer for the Survey123 website is virtually ready to go. This is for those of you who want to install the Survey123 website locally rather than having survey123.arcgis.com configured to work against your ArcGIS Enterprise. You can now test our release candidate before we officially make it available! Info here.

 

And much more...

 

There are many hidden gems available through the Early Adopter Program to test. You can find a more complete list of features for the Survey123 website here, and a list of other features for Connect and the field app here.  You will find that the Beta builds also address many bug fixes and other minor, yet important, enhancements you have requested via Esri Technical Support and GeoNet.

 

I am writing this blog post because I wanted to document a useful workflow that I developed for using Integromat to automate the creation of Feature Reports for Survey123 after editing the survey data.  As someone who had never used Integromat before, I spent a great deal of time researching the different intricacies of the Integromat modules and how to make them work for what I needed, as I couldn't find any examples that were quite the same as mine.  A lot of this workflow was accomplished by trial and error, so I'm posting this here in the event that someone else may find this example useful.  My particular difficulty in this project came when I attempted to process the automation differently when the survey was initially submitted (addData event type) vs. when it was edited (editData event type.)

 

My scenario is this:

 

I work in local government (city level) and we have continually been making services and applications available online as a convenience to our citizens.  As such, one item on our agenda was to make our Application for New Sewer Service available on the internet.  I created a survey in Survey123 for the purpose of allowing citizens to apply to our Sanitary Board for new sewer service (when you move to a new house and need to put the service in your name, or when you build a new house and need brand new service).  I also needed an easy way for our Sanitary Board staff to process these requests.  Creating an automated workflow with Integromat seemed like it would provide the perfect solution for automation, and paired with the power of Dashboards for ArcGIS, I think it did!

 

The Simple Workflow:

 

1) Citizen submits an application for new sewer service.

2) Sanitary Board staff receives the request.

3) Sanitary Board staff processes the request (they need to add some information to the form, such as new account number, deposit cost, date paid, etc.)

4) Microsoft Word application form is filled out with applicant’s information and filed in archive.

 

The Solution:

 

Workflow Item # 1 – Submitting the Application

 

To allow citizens to submit an application, I created a new survey in Survey123 Connect with all pertinent information included and published to our ArcGIS Online Organization.  This was the easy part.

 

Workflow Item # 2 – Receiving the Application

 

In order for the staff to access the information, I was going to train them on how to use the Survey123 online interface.  The problem with doing this is that they also need to have the ability to edit the data, which at the present time is only available to the survey owner or the individual survey submitter.  This was not going to work.  This is where I found out about embedding surveys in a dashboard Survey123 Tricks of the Trade: Embedding a survey in an ArcGIS Dashboard.  Even more importantly, embedding that survey into a dashboard in edit mode using URL parameters Survey123 Tricks of the Trade: Web form URL parameters (both great blog posts by Ismael Chivite).   This gave our staff the ability to go into the survey record and add data to the “office use only” fields (or change any other field that may have been entered incorrectly in the initial survey), including account number, deposit cost, date paid, etc.  Below is a screenshot of the dashboard with the editable survey form included:

 

 

I also wanted the staff to receive an email when a new record was submitted to avoid missing one or prevent a delay in processing, and this is the first use case for Integromat (I could have used Microsoft Power Automate (MS Flow), but I needed to run a feature report later, which at this time was not available in MS Power Automate).  I’ll post a screenshot of the Integromat Scenario a litte farther down.  I will also attach the blueprint exported from Integromat for those who might want to take a look. That takes care of workflow item #2 – the actual receipt of the application.  Moving on to processing.

 

Workflow Item #3 – Processing the Application

 

Using the dashboard with the editable survey form embedded, staff can now select the survey record (newest submissions come in on top of the list), review all the submitted information, add the new account number and other “office use only” information, then re-submit the now-complete survey form.  Now we need to get all this information onto the Microsoft Word Template that is the actual application form.  This is done using the “Create Feature Report” module in Integromat.  There was a little problem with this step, which I’ll explain a little further down when you can see the Integromat Scenario screenshot.

 

Workflow Item # 4 – Getting the Information onto the “paper” application

 

This item is accomplished using the Integromat “Create Feature Report” for Survey123 module https://support.integromat.com/hc/en-us/articles/360020842234-Survey123I then used the "Microsoft Office 365" module to send the Sanitary Board staff an email with the completed Feature Report attached. 

 

Integromat Scenario

 

Here is a screenshot of the Integromat Scenario:

 

 

Here’s an explanation of the scenario, step-by-step:

  1. Watch the survey for a submission using the “Survey 123 – Watch Survey” module
  2. The first router will send the workflow one way when a new record is submitted (using the addData condition) and the other way when a record is updated (using the editData condition). The top branch is the new submission and the bottom branch is the update (when the staff makes their edits).
    1. When a new survey record is submitted (again, top branch), the first module sends a confirmation email to the person who submitted the survey based upon the email they provided in the survey.
    2. Then the next router looks at the survey record and sends the workflow to one of four paths, depending on how many images were attached to the survey. This part was a bit tricky at first.  I initially had the “add photo” option set as a repeat in the survey, but it seems that repeats are difficult to handle in every aspect (and not supported by many ESRI tools and applications at this time, based on my research), so I simply removed the image repeat and modified the survey to only allow up to 3 images (3 separate “image” fields in the survey).  This router looks at the three image fields to determine if an image either exists for each field.  Based on what it finds, it continues along the appropriate path.  In my setup, the very top path is for surveys with no images, the second one down is for those with only 1 image, the third one down is for 2 images, and the fourth one down is for 3 images. 
    3. The images are retrieved using the “HTTP/Get a File” module. In the event that there is more than one file to retrieve, you can string multiple “Get a File” modules in line to accomplish this task, as you can see that I’ve done for those situations where more than 1 file is submitted with the survey.
    4. Last in this branch, I’ve attached the image(s) to an email that is sent to the Sanitary Board staff. This email serves 2 purposes – First, this is the initial notification that a citizen has submitted an application, and second, it provides the staff with the image attachments they will need to process the application.  This completes the initial submission of the application and concludes the automation of the first branch.  Now the staff processes the application.
  3. With all the information provided with the survey submission, the staff process the application (most of which is done is another computer system, which is where the account number is generated). Once they get all the information needed to complete the application, they open the dashboard I discussed previously and add the “office use only” information into the survey form.  When they hit “Submit”, the bottom branch of the scenario is triggered by the first router in the scenario (again, using the “editData” event type, which is accessed by clicking on the connector AFTER the router and applying the filter to look for “editData”.)
    1. (*Edit - read the comments below from Ismael Chivite - there is an easier way to set up for the Feature Report.  This is how I did it, but he describes a better way that I had not discovered at the time of writing this post.)  The first module on the bottom branch is the “HTTP/Make a Request” module. Theoretically, the next step would be the “Create Feature Report” module, but presently you cannot run the “Create Feature Report” module directly from the “editData” condition.  This has not been built into the tools yet, and it will not work.  I encountered most of my problems in this phase. Based on the research I conducted, only the edited attribute information will be included in the payload after the editData condition (not ALL of the attribute information for the feature; i.e. – only the field that was edited is available in the payload). In order to make the feature report work after an edit, you must first use the “HTTP/Make a Request” module to look up the hosted feature layer in AGOL, queried for the globalid of the current survey record (I also grabbed a few other fields that I used later in the process to assign a document name to my feature report).  Here is a screenshot of my HTTP request module:
    2. Then I used the “Parse JSON” tool. This effectively separates the data returned from the HTTP Request module into separate field names.   This tutorial helped me a lot:  https://youtu.be/QEUSzMadHdE
    3. Next is the “Create Feature Report” module (finally!!). This uses the globalId field that was parsed out from the JSON in the previous step. Basically, this provides the module the globalID for the feature it will use to generate the Feature Report. 
    4. Next is the “HTTP/Get a file” module to grab the completed Feature Report URL.
    5. Finally, I sent the email to the Sanitary Board staff email with the finalized Feature Report attached.

 

Now, here is the logical explanation:  When a new survey is submitted, a confirmation email is sent to the submitter, then an email is sent to the office staff to notify them of the new submission, including any image attachments submitted with the survey.  The office staff then processes the application and uses the custom Dashboard to edit the survey record to include additional information.  When they submit their edits, a Feature Report is created from the survey record and it attaches to an email and sends to the office staff.  

 I’m sure there are other ways to go about doing what I have done, but this is the way worked for me.  I could not find a good resource that explained how to run the “Create Feature Report” module after an “editData” condition, so if nothing else, I hope this helps to explain that process. I’m no programming master (by a long shot!).  Shoot, I’m not really even a novice.  But I do have to say that this Integromat integration is pretty easy to use.  Good stuff ESRI!

 

I've exported the blueprint for the scenario from Integromat and attached it to this post for reference.

 

You should also check out Getting Started with Survey123 and Integromat and Survey123 Tricks of the Trade: Integromat.  There is great information in both of these links.  Thanks!

By definition, a public survey is accessible to anyone who wants to submit data to it, but that does not mean that anyone should be able to look at the data itself. If your public Survey123 form contains sensitive information, you should configure your survey to prevent users in the public domain from downloading, querying or changing already submitted data. Unfortunately, it is not uncommon to find public surveys where the security configuration of the survey is not set  appropriately, allowing unauthorized access to the survey’s data. This article describes best practice for securing the data of surveys published in the Survey123 web designer. If you are interested in securing data for a public survey published with Survey123 Connect, refer to Securing data in public surveys (Survey123 Connect) .

 

If you are not familiar with the basics of public surveys, refer to Getting Started with Public Surveys.

                        

 

Sharing your survey publicly while keeping your data private

 

Technically speaking, you can control the sharing of your survey from the Survey123 website as well as from ArcGIS.com. The easiest and safest way to share your surveys is through the Survey123 website. Using the ArcGIS.com website is more error prone and can lead you to inadvertently share, and expose your data.

 

To share your survey publicly:

 

  • Sign in to the Survey123 website at survey123.arcgis.com.
  • From the survey gallery, open the Collaborate tab of your survey

  • The Submitter panel controls who can submit data to your survey. While in the Submitter panel, look for the section named 'Who can submit to this survey?' and check the Everyone (Public) option to share your survey publicly. 

 

If the option to share your survey publicly is missing, contact your ArcGIS administrator.

                        

  • Scroll down the page and look for the 'What can submitters do?' section. Check the 'Only add new records' option.
  • Click on Save at the bottom to persist all changes.

At this moment, your survey is shared publicly, allowing anyone to submit data through both the Survey123 web and field apps. You can get the link to your survey from the top of the Collaborate tab and distribute the link with your users. Since you have restricted access to 'Only add new records' in the Collaborate tab, it will not be possible to query, update, delete or download your survey data through the Survey123 web or field apps. Your survey's feature layer will also be secure, preventing any type of access (other than adding new records), from other Esri, third party apps or programmatic access.

 

Sharing your survey results privately for use within the Survey123 website

 

Your survey data is useful for people to make decisions, so at some point you will need to share that data with people who need it. Through the Collaborate tab, you can privately share this data with members of your ArcGIS organization so they can view, analyze and even download the data from the Survey123 website.

 

  • From the Collaborate tab of your survey, switch to the Viewer panel.
  • Look for the "Who can view results of this survey?" and check the groups within your organization that should have access to your survey's data.
  • Click on Save to persist changes.

Now that you have shared the results of your survey, users with access to the survey results will be able to look at the data from the Survey123 website using the Overview, Data and Analyze tabs of the Survey123 website. You can get the survey results link from the top of the Collaborate tab and distribute it within your organization or alternatively ask users to login into the survey123.arcgis.com website to see the survey results.

 

A deeper view into how all of this works

 

The Collaborate tab in the Survey123 website is meant to make the process for sharing and securing your data easy and error-free. Under the covers, sharing and access control to your survey data is managed through the use of ArcGIS feature layers and hosted feature layer views. These layers are saved in folder created in the ArcGIS account of the survey owner.  Next, we are going to look at these feature layer views in detail.

 

  • Log into the arcgis.com website and click on the My Content tab.
  • Look for your survey's folder in the Content tab. Note that Survey123 folders carry a Survey prefix followed by the name of your survey. It will look something like this:

Here is a brief explanation of the items in your survey directory:

 

  • A Form item: This ArcGIS item contains the definition of your survey with its questions, rules, look and feel and other properties. This item allows end-users to use your form from the Survey123 web or field apps.
  • A Hosted Feature Layer View with a "_fieldworker" suffix in its name. This item is created by the Survey123 web designer when the survey is first published. This item is used by the Survey123 web and field apps to submit data into ArcGIS. Permissions and sharing for this item are controlled via the Submitter panel in the Collaborate tab of the Survey123 website.
  • A Hosted Feature Layer View with a "_stakeholder" suffix in its name. This item is created by the Survey123 website when the survey results are shared through the Collaborate tab. This item is used to control access to the survey results through the Survey123 website.  If the Viewer panel of the Collaborate tab has not been used to share the survey results, this item will be missing.
  • A Hosted Feature Layer. This is where the actual data of your survey is stored. This item is created by the Survey123 web designer when the survey is published. You should never share this item.

 

The Survey123 website, through the Collaborate tab, manages the sharing and permissions set in each of these items. The website guarantees that the sharing across the items is consistent so the Survey123 website and apps work while keeping your data secure. Manually controlling the sharing of these items through the ArcGIS.com website can lead to inconsistencies and inadvertently expose your data.

 

  • The Form item is shared with all groups in the Submitter and Viewer panels of the Collaborate tab. Since the Form item simply describes questions and rules in your survey, it does not provide access to your data. If your survey is shared publicly for submits, this item will be shared publicly. If your survey is shared with specific groups in your organization for viewing results, this item will be shared with these groups as well.
  • The _fieldworker feature layer view is shared with users who need to submit data (submitter panel in the Collaborate tab). If your survey is shared publicly, this item will also be shared publicly. Access privileges in this item control how your data is accessed according to your choices in the Submitter panel of the Collaborate tab.
  • The _stakeholder view is shared with users who need to view survey results. Access privileges are controlled through the Viewer panel of the Collaborate tab.
  • The Hosted Feature Layer is kept private so only the owner of the survey has access to it. As long as there are _fieldworker and _stakeholder views, the Survey123 website and apps do not require direct access to this item. This item should always remain private to the owner of the survey.

 

Never share your survey feature layer. Keep your survey feature layer private and let the views do the sharing.

                        

 

For a more in-depth exploration of the specific security settings present in the _fieldworker and _stakeholder views, you can follow these steps:

 

  • From the ArcGIS.com Content panel, while looking at your survey's folder, click on the _fieldworker feature layer view.
  • Switch to the Settings tab and scroll down to explore all the permissions.

 

The most restrictive permissions in the _fieldworker view that enable submissions from a public survey while preventing access to your data are as follows:

 

SettingComments
EditingEnabled. Editing is required for the Survey123 web and field apps to submit data.
Enable SyncDisabled.
What kind of editing is allowed?Add enabled. Delete and Update disabled.
What features can editors see?Select this option: Editors can't see any features, even those they add
What access do anonymous editors (not signed in) have?Any option is fine since editors cannot see any features.
Export dataDisabled.

 

Sharing your survey results in web applications and dashboards

 

It is very common to build web mapping applications and dashboards on top of survey data. Enabling access to your survey data from these applications must be done with care, carefully controlling what data is shared and with whom.

 

The best way to enable access to your survey data by third party applications is by creating a new feature layer view on top of your survey's feature layer. By creating a new view, you can better control what data from your survey is shared and with whom, tailoring this to the needs of your third party application.

 

Using your survey's feature layer, fieldworker or stakeholder views to support third party applications is not recommended because in the future you may need to make adjustments to the sharing or permissions of these items to satisfy the needs of your third party application, and these changes can affect the normal behavior of your survey and compromising the security of your survey data.

 

Please read the previous paragraph again. Read it carefully so it sticks! 

 

This is how you can create a new view, for example, to support a web mapping application:

 

  • From your survey's folder in My Content, click on your survey's feature layer to open it's item details page.

 

  • Next click on Create View Layer.

Once your new view layer is created, you can control through the Settings dialog the permissions set on that layer. For example, you can disable editing and make it read-only. Through the Visualization tab, you can also use the feature layer view definition to choose which fields in your feature layer you want to expose.  It is also possible to apply filters to your view to hide certain rows, such as non-vetted submitted survey entries, etc. Finally, you can also share this new view layer according to the needs of your web application, which will likely be different from those of your survey.

 

For more information about working with feature layer views:

 

 

Do's and Don'ts

 

For surveys authored from the Survey123 web designer, the easiest and safest way to control the sharing of your survey and access to your survey results is through the Collaborate tab in the Survey123 website. It is recommended that you use the Collaborate tab for this purpose.

 

Altering the sharing and privileges on your survey items directly through the ArcGIS.com website is more error prone and can lead to a broken survey (for example, a survey that cannot access the _fieldworker view to submit data), or to a survey that exposes your data (through a misconfiguration of the sharing for the feature layer or its feature layer views).

 

It is not recommended that you alter the sharing or security properties of the survey form item or its corresponding feature layer and views. Let the Survey123 website do that for you.

 

Note: You should not need to read this last paragraph, because you read it twice already. In the event that you need to enable access to your survey data for third party applications, it is highly recommended that you create a new feature layer view on top of your survey's feature layer. It is not good practice to use the _fieldworker or _stakeholder views to support third party applications, because the sharing and access needed by your survey and the third party apps are likely very different.

By definition, a public survey is accessible to anyone who wants to submit data to it, but that does not mean that anyone should also be able to look at the data itself. If your public Survey123 form contains sensitive information, you should configure your survey to prevent users in the public domain from downloading, querying or changing already submitted data. Unfortunately, it is not uncommon to find public surveys where the security configuration of the survey is not set appropriately, allowing unauthorized access to the survey’s data. 

 

This article describes best practice for securing the data of public surveys published from Survey123 Connect. If you are interested in securing data for a public survey published with the Survey123 web designer, refer to Securing data in public surveys (Survey123 web designer) 

 

If you are not familiar with the basics of public surveys, refer to Getting Started with Public Surveys.

                      

A bit of context before we start

 

To properly secure your survey results it is important to understand first some basic concepts.  When you publish a survey using Survey123 Connect, a new folder is created in your ArcGIS account. This folder includes the name of your survey so you can easily find it.  Inside this folder, you will find a Form item and a Feature layer item:

 

  • Form item: The Form item contains the definition of the questionnaire presented to users: The labels of your questions, the calculations, media files and other resources needed to render your form.
  • Feature layer: The feature layer is the item where responses to your survey are stored.

 

In short, the survey folder contains one item (the form item) for the survey questions and one item (the feature layer) for the survey responses.

 

If you are working with sensitive data, you never want to share your surveys source feature layer. Instead, you will want to keep your survey feature layer private, and build feature layer views on top where you can better control the sharing and privilege properties. At the very least, you will want to create two feature layer views:

 

  • A view for the Survey123 web and field apps to use.  This view will allow the apps to add, and if appropriate to edit records in your feature layer.
  • A view for the Survey123 website to use. This view will control who can access the survey results through the Survey123 website, and with what privileges: just view, or also view and edit.

 

Additionally, you may want to create extra views to support other applications, such as ArcGIS Dashboards, Web AppBuilder apps, etc.

 

This article describes in detail how to build these feature layer views and associate them with your survey. If you are not familiar with the concept of feature layer views, I suggest read the Create hosted feature layer views—ArcGIS Online Help | Documentation help topic.

 

Do not create the views too early.

 

Let me put this upfront: as of version 3.9, Survey123 Connect does not like views: Connect does not create views, and does not handle them well when you delete or modify the survey. This is something that is going to change, rendering this whole article unnecessary, but for now bear with me.

 

As stated above, my recommendation is that you always use feature layer views when your survey is shared with people, but from a practical perspective you do not want to create the views too early. Survey design is an iterative process where you will be adding, changing and removing questions from your survey frequently. Some of these changes necessarily affect the schema of the surveys feature layer. If your survey is configured with views, Connect may not be able to change the schema of the source layer. If the schema of the layer is changed, your views will break.

 

For this reason, keep your survey without views for as long as you are working on it and configure the views when you are ready to put your survey in production, right before you share your survey with users.

 

Create a view for the Survey123 website first

 

I said before you will want to create at least two views: One for users who will look at your survey results through the Survey123 website, and another one for users to submit data through the Survey123 web and/or field apps. It is best to start with the view to control access to the survey results.

 

To build the view:

 

  • Login into the Survey123 website
  • Navigate to the Collaborate tab of your survey
  • Switch to the Viewer panel and hit Save.

 

 

 

If you return now to the Survey123 folder under Content in ArcGIS.com, you will notice that a new view has been created for your survey. This view has a 'stakeholder' suffix.

 

 

This new view will control who can use the Survey123 website to look at your survey results.  You will want to use the Viewer panel in the Survey123 website to control this. For example, say that users in a group called 'City of Cilantro' need to be able to look at the results of your survey, create reports and download data. Then you will go into the Collaborate tab, switch to the Viewer panel and share your survey results with that group. At that point, 'City of Cilantro' users can log into the Survey123 website and use the Overview, Data and Analyze tabs to do what they need. 

 

I would not recommend that you modify the sharing of this view through ArcGIS.com. For the Survey123 website to properly work, the sharing of the Form and stakeholder view items must be in sync.  The Collaborate tab in the Survey123 website takes care of that.

 

Create a view for the Survey123 web and field apps next

 

Configuring the view for the Survey123 web and field apps is a bit more involved. We need to create this view manually, then associate the view with the Survey123 Connect survey.

 

  • Log into the arcgis.com website and click on the My Content tab.
  • Click on the Form item to open its item details page, then click on Create View Layer. You can choose any title for your feature layer view.

To make your survey work against your own  feature layer view, you need to configure the submission_url and form_id XLSForm settings in your survey. This can be an error prone process at first. Once you are familiar with this I am sure you will do this with your eyes closed, but here I am going to follow a long but safe route:

 

  • In Survey123 Connect, from the survey gallery, click on New Survey and then choose the Feature Service option.
  • Look for the feature layer view you just created and give your new survey a throw-away name, such as temp or delete_me.

 

  • Open the XLSForm of your temporary new survey and switch to the settings worksheet. Then copy the values in the form_Id and submission_url cells into a text editor or a safe place, so we can paste them later into the original survey.

The submission_url value defines the feature layer (or feature layer view) that the survey is targeting. If empty, Survey123 Connect will create a new feature layer when you publish the survey. If a value is provided, the survey is published targeting the specified layer by the submission_url . The form_id value defines the sub-layer in your feature layer that drives the questions in your survey.

 

  • Back in Survey123 Connect go back to survey gallery, and open the survey that you want to make public.
  • Open the XLSForm, paste the submission_url and form_id values.
  • Save your XLSForm and publish your survey again.

 

The Publish dialog will indicate that your existing survey will be updated to use a custom feature service as specified by the submission URL, as shown in the next screenshot.

 

Now that your survey has been updated to target your own feature layer view, you can share your survey publicly with confidence. We will do that from the Survey123 website.

 

Sharing your survey publicly

 

  • Log into the Survey123 website at survey123.arcgis.com.
  • From the survey gallery, open the Collaborate tab of your survey

  • The Submitter panel controls who can submit data to your survey. While in the Submitter panel, look for the section named 'Who can submit to this survey?' and check the Everyone (Public) option to share your survey publicly. 

If the option to share your survey publicly is missing, contact your ArcGIS administrator.

                      

  • Scroll down the page and look for the 'What can submitters do?' section. Check if not already the 'Only add new records' option and click on Save at the bottom to persist all changes.

At this moment, your survey is shared publicly, allowing anyone to submit data through both the Survey123 web and field apps. You can get the link to your survey from the top of the Collaborate tab and distribute the link with your users. Since you have restricted access to 'Only add new records' in the Collaborate tab, it will not be possible to query, update, delete or download your survey data through the Survey123 web or field apps. Your survey's feature layer will also be secure, preventing any type of access (other than adding new records) from other Esri apps, third party apps or programmatic access.

 

If you go back to My Content in arcgis.com and check your survey folder, you will find that your feature layer view and the Form item are now shared publicly, while the feature layer remains shared only with you, the owner. This is the way you want it. Do not share the source feature layer if you want to keep your data safe.

 

Sharing your survey results in web applications and dashboards

 

The same technique we used to create a feature layer view for the Survey123 web and field apps can be replicated to support other apps and uses. It is not good practice to reuse the feature layer view we just created or to share the source feature layer. Build new views, restrict access to data as appropriate to the needs of the web app and share accordingly.

 

Here are a few links to learn more about feature layer views:

 

The coronavirus pandemic is front of mind for all of us. This crisis has changed the way we work and many in our community are having to adapt to new challenges and requirements in response to the COVID-19 disease. A key example is the increased demand for the collection and analysis of coronavirus-related data.


With that in mind, we have published a set of COVID-related templates in Survey123 Connect. These templates alone do not pretend to be an end-to-end solution for your COVID-19 needs. Like other community templates, the purpose is to provide practical examples of what you can do with Survey123 and demonstrate best practices for building smart forms with XLSForms.

Esri is offering a host of GIS resources and solutions to help you monitor and respond to the pandemic. This includes maps, applications and data. I encourage you to check out Esri's COVID-19 home page and COVID-19 GIS Hub.

It's also important to note that some of these samples are designed to collect personal information and health-related information. If your survey is to be shared publicly, you will need to secure your data and ensure that your data collection is compliant with the regulations in your region.

 

Let's start by taking a look at the samples. Below you will find a brief description of each template and the specific XLSForm techniques it highlights.

 

Community Support

Preview this sample in the Survey123 web app

 

Community Support survey thumbnailA survey form to help people connect with their community. Respondents can use this form to request support from their neighbours or offer help to others. This survey is designed as a single form that gathers both requests for help and offers of help. If required, you could split it into two separate surveys for requests and offers. The respective rows in the XLSForm have been highlighted in blue and orange. Delete the blue rows for one, and the orange rows for the other. You'll also need to remove the yellow row and the selected() function from the relevant column in each case.

 

This XLSForm sample demonstrates a technique to split out the responses to a select_multiple question into separate fields. A select_multiple question stores its answers as a comma-separated string. Using the selected() function you can record the choices individually in separate hidden fields. For more, see Understanding Multiple-Choice Questions in Survey123 for ArcGIS. This form also uses a regular expression to validate that an email address is formatted correctly. This expression is described in The art of hiding.

 

Testing Request

Preview this sample in the Survey123 web app

 

Testing Request survey thumbnailThis survey is intended to be completed by a health worker requesting a laboratory test for COVID-19. The clinician can collect information about the patient and the specimen type being submitted for analysis.

 

The XLSForm demonstrates how to validate that a date of birth matches an age (in years), and apply this check as a constraint. It also shows how to use the relevant column to control the visibility of questions on the form based on responses to other questions and how to apply the table-list appearance (or Single Choice Grid as it's called in the web app) to present a group of select_one questions in an easy-to-read table layout. For more information, see Survey123 Tricks of the Trade: Groups, Grids and Pages.

 

Inpatient Screening

Preview this sample in the Survey123 web app

 

Inpatient Screening survey thumbnailThis survey is an example of a form that could be completed by a health worker when a patient is admitted to a health facility. Collect personal information about the patient and details about any symptoms the patient is presenting with.

 

The example also uses table-list to display a block of select_one questions that each have the same choices. It also demonstrates how to use the string-length() function in the relevant column to check if an answer has been provided to a question, as well as a signature question to record a digital signature of the referring clinician. See the Signatures! blog for more.

 

Symptoms Check

Preview this sample in the Survey123 web app

 

Symptoms Check survey thumbnailThis survey provides a self-assessment of COVID-19 symptoms and is intended for use by the general public. The form could be useful for counties or cities in their efforts to measure the general impact of coronavirus infection. One of the key features of this survey is that it's in multiple languages! The XLSForm shows how to set out labels, hints and choices in English and Spanish. For more on this see Introducing Multiple Language Surveys. This sample was provided courtesy of Routt County, Colorado, as featured on the County's COVID-19 Information page.

 

If any of these templates is of interest, you can use them as a starting point for your own project. To download the templates, head to the Community samples section in Connect.

 

In Survey123 Connect, select New Survey. Select the Community option (1), enter a search for "COVID-19" or "coronavirus" (2) and then select a sample survey from the list (3).

 

Community samples in Survey123 Connect

 

Feel free to share with our Survey123 community your own COVID-19 XLSForms in a comment, below. I also encourage you to submit your coronavirus-related maps and apps with the greater GIS community here: Submit COVID-19 Maps & Apps | Support Response to Coronavirus Pandemic.

 

Banner image credit: NIAID.

Thumbnail images credit: PHIL and NIAID.