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

With every new release of Survey123, we include fixes, enhancements and new features into Survey123.  For the most part, having access to the latest and greatest fixes and features is straight-forward:

 

  • Survey123 field app: Install the latest Survey123 field app from the app stores.
  • Survey123 website: Reload the Survey123 website in your browser.
  • Survey123 report service: Nothing to do... every time you request a new report, the latest report engine is used.
  • Survey123 Microsoft Automate and Integromat modules: All changes get applied right away in run-time and design modes.

 

But what about your web forms? Well it depends so that is why I thought it would be worth going in detail over this.

 

Survey123 web form version locking

 

Survey123 web forms are version locked by default. That is, a web form (unless specified otherwise) will always use the version of the Survey123 web app that was current when you last published the survey.  This basically means that any new fixes and enhancements we apply to new versions of Survey123 do not take effect over your already published web forms.

 

We apply version locking by default because we want to make sure your surveys always behave exactly as when you published them, regardless of changes in newer versions of Survey123.  It is true that new versions incorporate fixes and enhancements, but they can also bring unexpected changes that may break your existing surveys. 

 

Three ways to upgrade your web forms

 

If you would like to upgrade the version of Survey123 used to render your web forms, you have different options.

 

  • You can disable version locking in your survey through the Settings tab of your survey. In the screenshot below, you can see that I have a survey that was published with version 3.5. If version locking is enabled, then the 3.5 version of the Survey123 web app will always be used to render the form. By activating the option to 'always use the latest version', the web form will always run on the latest and greatest version.

 

 

A handy preview link right by the 'always use the latest version' option is available so you can validate that all looks good before you make a change.  I strongly suggest you always preview your survey to make sure everything behaves as expected.

 

Choosing to always run your web forms against the the latest version of the Survey123 web app available is tempting, but consider the following:  First, by disabling version locking you are forcing a dynamic upgrade of your published survey to the latest version when the survey is loaded in your browser. We do our best to minimize the impact of upgrading your web forms on the fly, but this could slow down the loading time of your form.  Second, with every new update there is always a chance that something could break. If you disable version locking you lose control over which version of the Survey123 web app will be used to render your form.

 

  • You can force your web form to use the latest version available of the Survey123 web app by adding the version=latest query parameter to the URL. For example:

https://survey123.arcgis.com/share/<your_survey_id_here>?version=latest

Note that version=latest has been added as a query parameter to the URL.  You can combine version=latest with other query parameters as described in Survey123 Tricks of the Trade: Web form URL parameters 

 

I like to use this technique to thoroughly test out my surveys before I upgrade them to the latest version, but I do not like to share URLs with the version=latest parameter in them because people may accidentally or intentionally remove it.

 

  • Finally, you can upgrade your survey web form by republishing it.  With this approach, your web form is upgraded to the current version of the publishing tool (Survey123 Connect or Survey123 web designer) you use. By keeping version locking activated, your web form is always cached and ready to go (no on the fly upgrades). You would need to republish it again if in the future you consider that you need to upgrade the web form version.

 

All in all, I personally prefer to decide when to upgrade a web form. If a web form is working all good, I leave it alone: Don't change anything that works!  In the event that I want to leverage a particular fix, enhancement or new feature in a more recent version, I first validate my web forms with the latest release (using version=latest), and then I republish the survey to upgrade the web form.  Knowing that my web form is version locked and running on the exact version I want gives me extra peace of mind.

ichivite-esristaff

Hug Day Release

Posted by ichivite-esristaff Employee Jan 21, 2020

[Updated on January 27, 2020]

 

Can you tell the difference between a bear hug and a cheek hug? Today is National Hugging Day!  You can't (yet) hug through social media and AI cannot hug (yet). YOU have to hug, you alone. Hugging is good for you. Hugging is good for people you hug. Hug!

 

 

Today, we let a new update to Survey123 go free. This release is mostly focused on the reporting capabilities of Survey123. We are adding new functionality to our report service such as report previews, PDF outputs and merging of multiple reports into a single file. This update also brings a good number of fixes for the Survey123 website and web app. Survey123 Connect and the field app have not been updated with this release.

 

If you are not yet familiar with Survey123 Feature reports, check theUnderstanding Survey123 Feature Reports blog and/or have a look at this 7 minute tutorial video:

 

 

 

Report preview mode

 

Many of you requested that we add a new preview option so you can generate test reports for free. Authoring good report templates is an iterative process and it is common to generate many test reports before a template is ready. The report preview output consists of a watermarked PDF file. Here is an example:

 

This new option to generate a preview of the report is only available to the owner of the survey. Once generated, the download of your report preview will start automatically in your web browser.

Please note that selecting content in report PDF previews is disabled.

                        

 

PDF support added to Survey123 Reports

 

You can now save your Survey123 reports in PDF format. A new Format drop down has been added, as shown below, so you can choose PDF as your output.

 

 

If you plan to generate reports in PDF format, it is highly recommended that you embed fonts within your Microsoft Word template as described in the Embed fonts in Word or PowerPoint - Office Support help topic.  If you do not embed the fonts, your report outputs may not look exactly the same as your template.

 

[January 27, 2020] The Integromat module has been updated so you can create reports in PDF.

 

Merge multiple reports into a single file

 

When creating reports in bulk, you can now also choose to merge all reports into a single file. If the collection of feature reports you want to merge is larger than 512Mb we will automatically split your job into multiple files.

 

 

Expanded report template syntax

 

A number of new functions have been added to the feature report syntax. For example, you can now:

 

New functionExample
utcOffset. Apply an UTC offset to a DateTime question. This is useful if you want to express time in your reports in local time. Remember that all dates and time values in ArcGIS are always stored in UTC time!${survey_date | utcOffset:"+01:00"}
Apply basic math operators: +, -, * and /.  Use them to perform basic aggregation functions in your report using data from your survey.${boys + girls}
checked. Shows a checkbox to indicate if a particular element has been checked in a single or multiple selection question.  The new checked function replaces the old selected function for this purpose.  The selected function should be used along with conditional (if) statements instead of for showing a checkbox.${defects | checked:"Paint"} Needs paint
selected. In the past this function was often used to add a checkbox into your report when a particular choice in a selection question was checked. While all report templates using selected for that purpose will continue to work, it is strongly recommended you now use this function within conditional statements. Anything shown in between the ${conditional statement}  and ${/} will be shown only if the conditional statement evaluates to true. If you want to add a checkbox to your report, use the checked function instead.  ${if needRepair | selected:"yes"}…${/}
${if favoriteFruits | selected:"apple"}…${/}
countSelected. Count the number of elements checked in a multiple selection question. ${defects | countSelected}
selectedAt: For a multiple selection question, returns a specific selected choice for the given index (zero-indexed). Returns an empty string if the index does not exist.${defects | selectedAt:2}

 

For more details and additions in this release, check the Feature report templates—Survey123 for ArcGIS | Documentation help topic.

 

Miscellaneous fixes and minor enhancements

 

Important note: As described in Understanding web form version locking in Survey123 already published surveys will not benefit from fixes to new releases of the Survey123 web app, unless you upgrade them.  Since this update does not include a new version of Survey123 Connect, use the version=latest URL query parameter to load your survey or disable version locking in your survey.

  • BUG-000126720 Basemap selected for GeoPoint question in Connect for Survey123 is not honored when viewing the survey through survey123.arcgis.com
  • BUG-000126537 Non-survey owners cannot edit their submissions through the Survey123 for ArcGIS web App despite documentation stating it is possible to do so. ([Data] Non-owners with both stakeholder and fieldworker privilege cannot edit in Individual Response for Connect surveys).
  • ENH-000117970 The default Admin role in the Survey123 for ArcGIS website does not have the 'Everyone' option available in the Collaborate tab when the organization has the 'members can share content publicly' setting disabled.
  • BUG-000124120 Hide Parameter in Web Form URL fails to hide Survey Fields that are within a group. (Hide questions inside of group of page through URL parameter).
  • BUG-000126428 Adding an image URL link in the Survey Description section causes the survey to fail to publish in the Survey123 for ArcGIS website with an error message, "ObjectStoreException. Unable to add or update item: &lt;item_ID&gt;."
  • BUG-000124617 When the 'appearance' field is set to hide-input for a Geopoint question in a Survey123 for ArcGIS XLSForm, the Easting and Northing values are identical (UTM Coordinates) when the survey is opened from a web browser.
  • BUG-000125399: Time question with value set to now() is not able to render the correct 12PM time in the web form.
  • BUG-000121113 If a select one survey response contains a comma in the name value the value/label will not be printed in a Feature Report.
  • BUG-000115396 The CreationDate method does not include the UTC offset option when generating a report in the Survey123 for ArcGIS website.
  • ENH-000118417 When using the Report (Beta) function on the Survey123 website to display a geopoint, there is no documented method of setting the map extent for the record.
  • BUG-000126329 The Collaborate 'Viewer' settings allowing non survey owners to have the capability to edit their own submitted records are not being honored when attempting to edit in the Data page.
  • BUG-000126582 When entering survey responses for a survey using the Survey123 for ArcGIS website, pressing 'Enter' in a text question launches the computer's camera.
  • ENH-000125299 Add error handling for an extra slash at the end of the Survey123 for Enterprise URL.
  • BUG-000124359 Error "Can not find your location. Please check your browser to ensure that your location is shared." when using the "Find my location" option on iOS devices on publishing a survey using the Survey123 Web Designer.
  • BUG-000122802 Photos missing properties do not display when Custom Report is printed from survey123.arcgis.com.
  • BUG-000099614 In the Analyze Tab on Survey123 for ArcGIS Hub, DATE values will only be reported if they have same DATE as the initial report.
  • BUG-000121513 Geopoint question device location does not work as expected in Microsoft Edge 41.x and Internet Explorer 11 browsers.
  • BUG-000127348 Submission w/ Attachment fails on SQL Server due to lower case GlobalIDs.
  • BUG-000126959 AttachmentInfos and AttachmentInfo are empty in the Integromat module for Survey123 for ArcGIS when a survey is published or updated in Survey123 Connect for ArcGIS 3.6.127.
  • BUG-000124762 When Creating a Survey using the Survey123 Web Designer with a Note question, the Note does not honor the alignment settings for an image when the survey is viewed online.
  • BUG-000126022 DE-000003375 The USA Topo Maps basemap does not work in Individual Response and Feature Report when location is outside USA.

 

Next steps

 

We are finalizing work in the Survey123 Integromat module to incorporate the new Format parameter. This will allow you to automate the creation of PDF reports using Integromat. We are looking at having this ready before the end of the month. We will simply update the Integromat module and add a brief note in this blog post when ready. The Integromat module has been updated with support for PDF output format [January 27, 2020]

 

From a functional perspective, we also have received requests to expand the report service from feature reports to summary reports. This is also right now in design and we will update our Survey123 Early Adopter Community website as soon as we have something for you to test.  

 

The next update to Survey123 Connect and the Field app (3.9) is almost ready. We have uploaded the latest Beta builds to the Early Adopter Community website and are looking forward to your feedback before we move to General Release. The main new feature we plan to make available touches on the Notify users a Survey123 form has been updated GeoNet idea.  There are also some quite juicy fixes in this 3.9 release but I leave the details to our Early Adopter documentation on 3.9.

 

If you are a fan of Survey123 web designer, you should know that we will soon add a new Map question type. The new Map question type will bring support for polygons and lines into the web designer.

 

For more details on what is cooking for the next updates to Survey123, check the Survey123 Early Adopter Community website.  There are a good number of active projects waiting for your feedback!

I discovered a handy workflow for calling and passing arguments to Python scripts using Survey123’s webhook capability, Integromat, and Google Cloud Functions. The possibilities are endless, but some use cases include:

 

  • Making scripts available and convenient to users without a Python environment on their machine
  • Calling a script each time a survey is submitted or updated (e.g., perform a field calculation)
  • Update records in a separate feature layer based on survey responses

 

In this example, I’ve made a simple web form and Python script that checks an ArcGIS Online org for new items and sends a raw list object of these items via email.

 

This post assumes basic familiarity with Survey123 Webhooks and Integromat. There are great Integromat intro posts from Ismael Chivite here and here.

 

Step 1: Create a Google Cloud Function to run your script

  1. Go to https://console.cloud.google.com/, log in with your Google account, and follow prompts to begin a Google Cloud Platform trial.
  2. You’ll be provided with a default project titled “My First Project.” From the dashboard of this project, in the Resources pane, click Cloud Functions. You can also go directly to functions at https://console.cloud.google.com/functions
  3. At the top of the page, click Create Function. Name your function and accept defaults except Runtime, which you’ll change to Python 3.7.
  4. Click the requirements.txt tab, above the code editor pane. This is where you’ll enter any Python modules required by your script that aren’t included in the standard Python distribution. For this example, we will need to add only the arcgis module.Add modules to requirements.txt
  5. Now we add our Python code! Click the main.py tab and paste your code. Be sure to wrap everything in a function, pass ‘request’ as an argument to your function, and assign variables used by the function with request.args.get(‘example’), matching the field names from the Survey123 form you’ll create in the next section. See my example below.
  6. Enter your function name under ‘Function to Execute’ and click Create. It will take a few minutes for your function to deploy.

 Python code for main.py

 

Step 2: Create and publish Survey123 

Now, let’s create a form to call the Python script.

  1. Open Survey123 Connect and create a new survey with fields for each argument you’ll be passing to the script. These field names must match what you provided to the request.args.get() method in the script – in our case, “startDate” and “toEmail”.Survey123 Connect fields
  2. Publish your survey.

 

Step 3: Set up a scenario in Integromat and connect a webhook to your Survey123 form

You’ll need to set up two modules in Integromat: The Survey123 module to watch for a new survey submission, and the HTTP module to make a request that calls the script on Google Cloud Functions and passes arguments to it.

  1. Add the Survey123 module to your scenario and connect it to your new survey as described here.
  2. Next, add the HTTP module but leave it alone for now. Connect the two modules:Integromat scenario
  3. Return to your Google Cloud Function, click the Trigger tab, and copy the URL for your function:Google Cloud Function URL
  4. Paste your URL into the HTTP module in Integromat and add a question mark at the end, followed by your first field/argument name and an equals sign, as shown below.http module integromat
  5.  Now grab your first argument from the dynamic fields window by expanding Attributes and clicking the field name:get dynamic field
  6.   Repeat for additional arguments, separating with an ampersand (&). The final URL in our example looks like this:integromat http url
     

Step 4: Call your script with the survey

  1. Turn on your Integromat scenario (or click Run Once)
  2. Open your survey in a web browser, fill in your arguments, and submit. You just called your script!

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.

 

The Early Adopter Community is critical to Survey123. It allows the development team to share with you early access to the software for user testing and feedback. This feedback is used to refine new features and fixes before they are made available under general release. EAC offers you a great opportunity to try out your own surveys and workflows with the Beta software and anticipate any issues that may arise in upcoming releases.

 

We have just updated EAC with new Beta versions of Survey123. Below is a list of some of the Beta features and when we estimate they will be available.

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.

 

Survey123 Feature Reports (PDF, Previews and Merged Reports)

 

We released Survey123 Feature Report capabilities back in July 2019. EAC will give you access to the Beta builds of the Survey123 website, which include new options to:

 

  • Generate outputs in PDF format. We want to make sure this works well with your existing report templates and that you do not have any issues with fonts once you open the PDF on your computer.
  • Preview Report designs, so you can put together your report templates without incurring ArcGIS Online credit costs. The output preview documents will be always generated in PDF format and include a watermark.
  • Merge multiple reports in a single file. This new option is available when you want to generate report files in bulk. When chosen, all your feature reports will be combined into a single PDF or docx output file.

Please note that when generating reports (other than previews) through the Early Adopter Community your account will be charged with credits. Use the preview option if you do not want to be charged.

You can try out all of the above through survey123beta.arcgis.com. When testing the new PDF and report preview capabilities, please report your findings (positive and negative) in the new Survey123 website forum in the EAC website. We are targeting late January 2020 for the release of both of these features.

 

Survey123 Field App (Survey update notifications and more)

 

Through the Early Adopter Community website you can access Beta builds of the Survey123 field app for iOS, Android, Windows, MacOS and Linux. The Beta build of the Survey123 field app cannot run on the same device as the released version, so you will need extra hardware to test it or remove the released version from the device first.

 

The latest Beta builds available include support for:

 

  • Survey update notifications. This work is inspired by our most popular Survey123 Geonet Idea: Notify users a Survey123 form has been updated. This will facilitate having field users more easily refresh their surveys if new updates are available in ArcGIS Online or Enterprise. This feature is planned to be made available in late February or early March 2020. 

 

  • No more random log outs. This is a fix to an issue some of you have reported where field users would get randomly log out, forcing users to have to type their user credentials again. The fix to this problem is now included with the latest Beta builds.
  • There are also a number of additional features available for testing. Information about the specific bug fixes addressed in each Beta update and new features are detailed in the Announcements section of the EAC website. 

 

The Beta builds of the Survey123 field app are also useful for you to test your existing surveys. As much as we do our best to ensure backwards compatibility with older versions, your own testing can help highlight issues we may never find on our own.

I work for a local government with an Office 365 subscription that includes Power Automate (aka MS Flow) and I wanted to see what I could do with it. After Zoltan Kovacs posted his 3rd blog on using Power Automate to send an email using HTML from a survey I was talking with my colleague (a developer) who told me that it was possible to generate a PDF from HTML using Power Automate (PA).

 

Wow! Really? 

 

It's true. It's possible. There is a convert file action that will convert HTML to PDF. 

 

convert file

 

The Survey123 Feature Report generates a nicer output and it includes attachments and its much easier to create a Word doc template than it is to create HTML. My method does not include attachments from Survey123 because it hasn't been exposed to Power Automate by Survey123 yet. My method also requires you to know HTML and CSS because you will need to fiddle with it. You can save a Word document as HTML (two options, more on that later) to get started but I just went old school and typed it out.

 

Here is the flow. You will notice the second step is cut off. It is a parallel branch that would have been too wide to capture and see it. 

 

entire flow with renamed steps

 

I'll explain my steps here and include tips along the way.

 

Step 1 is where you trigger the flow with your survey. 

 

Tip: Any step or action you add to your flow can be renamed. Clicking on the 3 dots on the side will show a drop down menu. Rename is one of them. Adding comments is another.

 

include comments

 

Step 2: parallel branch where I initialize and set variables inside a switch case operation

 

This survey records water meter replacements. The choice value is stored with a code. I wanted the report to show the label and not the value. I know that Survey123 has jr:choice-name but I built this survey 3 years ago and I didn't want to change it. I looked at using a SharePoint list to lookup the value but I couldn't figure it out (I felt like I was this close to a solution! but I had to walk away and move on). 

 

I tried using the If expression as it seemed similar to the If expression in Survey123. However, unlike Survey123 it cannot contain nested expressions.

 

There is a switch case operation. My solution was to initialize a variable and then use the switch case operation to set the variable to a nice looking label for every value. 

 

 

set variable

 

The reason why I cannot show the entire parallel branch in the screen shot is because I have 4 branches and each branch has 4 switch cases. Two of the switches have multiple cases (17 in one of them!). It is wider than my screen can show when I click into them. 

 

Tip: Have all of your parallel branches figured out in the beginning because it is currently not possible to add one in later without needing to redo your entire flow. 

 

Step 3 and 4: Read part 2 from Zoltan Kovacs for how to set this up.

 

Step 5: Create the HTML file (add step: create file action in OneDrive for Business)

 

A side note about HTML: It's the trickiest part because … well … it is HTML. While testing I typed the HTML myself because I wanted a simple form.

 

I did have a Word doc of this form. In Word, if I saved it as web page, opened it in Notepad++ it was over 1300 lines long! If I saved it as a web page filtered it was about 300 lines long. Filtered means it strips out all of the Word tags making it impossible to turn it back into the same Word document again. 

 

A side note about challenges using the PA user interface: This report I created is not very long. About a half of a letter sized page. However, I was unable to see all of it in the PA interface. One of the challenges with the interface is that the dynamic content is in a floating window all of the way down at the bottom right.

 

dynamic content

 

It doesn't follow you as you scroll up. If you want to insert the content you have to mouse click exactly where you want it, scroll down, click on the content and then scroll back up to see if it put it where you want it. If you didn't mouse click exactly (even if you think you did) it will appear at the top of the file content. While it is possible to click on the dynamic content and drag it up through the file it is slow and it may need to be done multiple times to get it where you want it.

 

The next screenshot is the beginning of the HTML. The folder path is where the HTML file is saved in OneDrive for Business. This is one of the connections you need to set up in advance. I believe you cannot go deeper than one folder off of the root folder.

 

Tip: I found that it was possible to insert code in the HTML while using Notepad++. For example, the dynamic content for anything from Survey123 is triggerBody()?['feature']?['attributes']?['field name']. In Notepad++ I used

@{triggerBody()?['feature']?['attributes']?['field name']}.  Once it was copied into the PA window it changed into the normal looking green dynamic content.

 

Tip: I'm using inline CSS but it is possible to reference an external stylesheet. I have not tried this yet.

 

The file name can be a dynamic value. I was never able to figure out how to do this in Integromat. The green icon with the checkmark is coming from the survey. In this particular case it is the service address.  I added .htm

 

create html 1

 

PA uses different colors for dynamic content. So far I've seen green for Survey123, blue for the built-in functions used to generate the time stamp and purple for the variables I set.

 

dynamic content colors 1

dynamic content colors 2

 

Step 6: Create the PDF file

 

When you create the file in Step 5 from above the dynamic content will now include ID. It is all that is needed for this step.

 

create pdf file

 

Step 7: Save the file to OneDrive

 

When the HTML file is created in Step 5 it actually saves the file to OneDrive. That doesn't happen in Step 6. You have to explicitly save it using the Create File operation (I've already renamed it in this screenshot). Choose the folder and add the file name and file content from the dynamic content window. 

 

save pdf file to onedrive

save pdf to onedrive using dynamic content

 

Step 8: Send email (V2) preview

 

I didn't really have to send an email to myself with the attachment as it was saving it to OneDrive. It was part of my testing.

 

send email

 

I went through a lot of trial and error and Google searches a couple of weeks ago figuring this out even though I know (through the early adopter program) that a PDF option is coming to Survey123.

 

I'm a GIS specialist who dabbles in the development world. I'm no Power Automate or webhook expert. There is probably a different way to do this but I wanted to share this with the community. It might inspire others to find a different solution or be inspired to try something new.

 

p.s. I finally finished writing up this post and I've already found a possible alternative to using HTML!

Filter Blog

By date: By tag: