Select to view content in your preferred language

Hoping to concat/ convert multiple measurement fields as data is collected.

384
1
Jump to solution
05-13-2024 04:22 PM
TimothyE
New Contributor

Hey all,

I inherited a web designed Survey123 used with several fields of the same measurement type but in different units (ie Width in feet, width in inches, width in meters), with a conditional statement referring to which 'Survey Unit' you select making the appropriate unit's questions appear. That has left an attribute table with 3 columns for most measurements, leading to a messy pop-up and hard to query dataset for surveyors to look through the data. 

This survey is still being used to collect data so my first thoughts of Arcade to concatenate/ convert fields to a 'master column' for querying and to display in a pop up did not work as it did not update with new entries (at least how I had attempted it). I am far from a coding sleuth, but what would the easiest way to convert and join these measurement columns to a like unit? Attribute rules, ArcPy, etc?

 

Thanks for any help!

0 Kudos
1 Solution

Accepted Solutions
DuncanC
Frequent Contributor

You could do it in XLSforms or javascript on the form but like you found that will only mean newly created or edited records will get ran through your updated system and have your new fields with consistent units filled out.

I'd do it in Python.  I think that's a totally reasonably option.  Doing it in ArcPy would be the same if that's what you're familiar with. But either way this will only fix the records that exist when you run the script.  So you'll have to run it regularly to process the new records. 

I'd probably want to do both, update the old records via script, and change the form so new records don't need to be processed by a script to be how you want them.

View solution in original post

0 Kudos
1 Reply
DuncanC
Frequent Contributor

You could do it in XLSforms or javascript on the form but like you found that will only mean newly created or edited records will get ran through your updated system and have your new fields with consistent units filled out.

I'd do it in Python.  I think that's a totally reasonably option.  Doing it in ArcPy would be the same if that's what you're familiar with. But either way this will only fix the records that exist when you run the script.  So you'll have to run it regularly to process the new records. 

I'd probably want to do both, update the old records via script, and change the form so new records don't need to be processed by a script to be how you want them.

0 Kudos