ArcGIS Survey123: Math Hacks

ArcGIS Survey123: Math Hacks

Data collection is tough enough. Add math into the mix, and it gets even harder. As someone who is terrible at mental math (especially when I was in the field), I’m a huge fan of letting Survey123 do the math for me. From auto-filling values and converting units to running calculations, you can make your forms smarter, faster, and less error-prone. This week, I’m diving into how to automate calculations in Survey123, because if we have to do math, we may as well let the software handle it for us.

What Can You Automate with Calculations?

Survey123 is more than just a tool for collecting data; it’s also your personal math assistant. By automating calculations, you can make your forms smarter and save yourself a lot of manual work. Here’s a breakdown of what you can automate:

  • Auto-Fill Totals – Sum up multiple values, like field areas or counts, without manual entry.
  • Convert Units – Automatically convert between units (e.g., acres to square feet or hectares) so you don’t have to do the conversion in your head.
  • Calculate Values – Apply specific math formulas, such as determining herbicide concentration based on acreage.
  • Use Calculated Values to Determine Other Attributes – If a field needs to meet a certain threshold or range to match a specific category, Survey123 can automate that classification for you.
  • Concatenate Stuff – Need to combine multiple values into one field? You can use calculations to concatenate text, IDs, or any other information directly in your form.

There’s a ton of flexibility in what you can calculate, and you can apply all kinds of logic to make those calculations as powerful as you need them to be. Just like with relevant fields in Survey123, you can use conditional logic within these calculations too. But remember the tips I shared earlier for debugging; math can get tricky, and adding Survey123 XLS design syntax into the mix can make it more of a challenge to get right.

Check out last week's post to learn more about the logic within the relevant fields that you can also use in calculation fields.

How to Set Up a Simple Calculation

Now that we've covered some of the possibilities, let’s jump into how to set up one of these simple calculations. Calculations will live in the "calculation" column of your XLS design. Below are some simple examples on things you can do.

Auto-sum multiple fields

You can sum values of multiple fields using a simple formula. Just make sure the fields you are summing are numeric.

# Sum fields 1, 2, and 3
${field1} + ${field2} + ${field3}        

Date and Time

If using dates and times in surveys, I highly recommend checking out this post about formatting them in a way a human can read: Dates and Time in Survey123

# Today's Date
today()

# Date and Time RIGHT NOW!
now()        

Unit Conversions made easy within your survey design

Remember to check the units of your original values before performing conversions to avoid errors

# Convert Acres to Square Meters
${acres} * 4046.86

# Convert feet to meters
${feet} * 0.3048        

Concatenate Strings

Use concatenation to generate structured IDs, ensuring consistency across survey data and datasets.

# SiteName - StreamName - Assessment - Date
concat(${Site_Name}, "_", ${Stream_Name}, "_Assessment_", now())        

Formulas with Logic

These types of logic in your calculation column can help automatically categorize data based on field observations, reducing manual data entry and errors.

# Stream determination (NCDWR example)
if(${total_points} <= 19, 'Ephemeral', if(${total_points} <= 29, 'Intermittent', 'Perennial'))        


Calculations in Action!

Want to learn more? Check out these posts, and I suggest you bookmark them for later: XLS Formulas & Survey123 Tricks of the Trade: Calculation modes. Also, make sure to check out the "Calculations" sample in Survey123 Connect!


Next week we will wrap up our Survey123 journey with some hot tips!


Pro Tip: When setting up calculations in Survey123, the last thing you want is an end user accidentally (or intentionally!) messing with a calculated field --> TRUST NO ONE! The best way to prevent this? Set your calculation fields to "read-only."

Megan Cochcroft

Detail-oriented and responsible GIS professional with 10+ years of experience

1 周

Great information!

回复
PARTH BAROT

GIS Analyst | Geospatial Data & Mapping | Python & SQL | Remote Sensing | ArcGIS & QGIS | IT Integration

1 周

Very informative

回复

要查看或添加评论,请登录

Megan Engel, GISP的更多文章

社区洞察

其他会员也浏览了