The Power of Nothing

9871
15
10-26-2017 11:17 AM
JamesTedrick
Esri Esteemed Contributor
14 15 9,871

With the 2.4 release of Survey123 Connect, a null value is now supported in the bind::esri:fieldType column of an XLSFormWhen the field type is null, Survey123 Connect will not create a field when publishing.  I’d like to highlight 3 cases where this can really enhance your forms: 

  1. Intermediate Calculations 
  2. Multiple Geopoints 
  3. More easily match an existing feature services 

 

Intermediate Calculations 

When doing a set of complex calculations, it’s often easier to break out sub calculations into their own question to make them more manageable.  While this was easier for you as a survey author to manage, this meant that you would have these intermediate steps stored in the database.  By assigning these the null field type, we simplify the data being stored to only the final calculations. 

For example, this Excel sheet calculates the linear regression of three observations. This involves a number of intermediate calculations, beginning with calculating the mean value of X & Y and then the distance an observation is from the mean value. 

 

Multiple Geopoints 

Form with 2 points

Another popular request the null value solves is the ability to capture multiple locations in a form; one location can be stored as the geometry of the feature with the other points being stored in x & y fields. Note that as the survey submission needs to have a geometry, you must have 1 geopoint question not set to null.

An example where multiple geopoints are useful is when collecting the location of a culvert or other relatively straight linear asset.   

To store the point information, get started by creating 3 (or more) questions for each point after the first: 

  1. The geopoint question to record the value 
  2. Two decimal (or calculate/hidden) questions to store the points x and y values (add additional fields for z and accuracy, if desired) 

Set the field type to null for the geopoint and use the pulldata(‘@geopoint’) function to extract the value after the point is set.  Here's a basic sample with a start and end point. 

 

Matching an existing feature service 

While Survey123 can automatically create a form based on an existing feature service, it may not create the form you quite want.  For example, a field storing how long someone has lived at a place might be better shown on the form by asking when did they move in – the length of time can then be calculated.  By creating a separate question to be asked with the null field type, you can create some flexibility between what is asked and the data that gets stored. 

 

Have another use for the null field type? Share in the comments below! 

 

 

 

15 Comments
by Anonymous User
Not applicable

YES!  Awesome addition.  Thank you.

by Anonymous User
Not applicable

Great feature!

I tested it on a new "Advanced Template" and it works very well.

I have an old Survey where I want to use this feature -but then the it states it is a forbidden value.

Is it possible to disable this autocheck in just one field as I don´t want to start from the beginning with a new template?

JamesTedrick
Esri Esteemed Contributor

Hi Johan,

Yes, you can either disable data validation for that cell or add the null value to the list of field types in the 'types' worksheet.

FranciscoAndrade1
Occasional Contributor

I have tried adding multiple geopoints to a survey and I am able to successfully add the multiple geopoints using the survey123 app while out in the field. But once I view the survey in the data section of survey123 I cannot see the multiple geopoints. Is this an issue or is this correct?

Two Geopoints entered in Survey

Only one Geopoint displayed in the data

JamesTedrick
Esri Esteemed Contributor

Hi Francisco,

Yes, this is correct- you will only be recording one point as a point; the others will be recorded as x,y values in the survey (and you will need to do some processing work afterwards to generate points from those).

LiamHarrington-Missin
Occasional Contributor II

Hi thanks for the post, very interesting.

However, I am having some trouble.  I am trying to embed a "null" geopoint question into a repeat and it isn't working.  As soon as I set the type to "null" the whole repeat stops functioning. It just goes blank.

Any thoughts?

JamesTedrick
Esri Esteemed Contributor

Hi Liam,

I am seeing the same issue with geopoint questions in a repeat.  I've logged it to be looked into and addressed.

LiamHarrington-Missin
Occasional Contributor II

Thanks James Tedrick

Off the back of the above comment can you provide an example of the type of processing you can do to re-extract and present the locations.

thanks

Liam

JamesTedrick
Esri Esteemed Contributor

Hi Liam,

There are a couple of ways that come to mind:

LiamHarrington-Missin
Occasional Contributor II

Hi James Tedrick,

You recently fixed this bug in the App and I started using it.  It turns out that whilst it is fixed in the App it seems to cause the Reporting (Beta) tool to fail.  I've raised as an ESRI case (#02177767) so hopefully it is in hand. 

ChaimSchwartz4
Occasional Contributor

I love it!

KeithGerhartz1
Occasional Contributor II

Is it possible to pass a value for a null field as a URL argument?

ChaimSchwartz4
Occasional Contributor

Yes it is, the same way you'd pass any parameter.

KeithGerhartz1
Occasional Contributor II

It does not appear to work. I pass value and attempt to use it as a calculated or default value for a select_one question and the specified answer is not selected. If I do the same thing using a database field, then it works.

VanessaSimps
Occasional Contributor III

Hi @JamesTedrick I am trying to utilize this technique in order to pass the x,y of a point selected on a map into my survey. I think I am missing something in your instructions above. Here is how I have my table set up:

VanessaSimps_0-1629502510537.png

 

I have the  pulldata(‘@geopoint’)  in the calculate column. I am wondering if I am supposed to adjust  something in this, is there variable that I should be using in there?  How does Survey123 know that I need the x value and then the y value in the following field? I am stumped here! 

Thank you in advance, Vanessa

About the Author
I work on the Survey123 team. Please note that I do not use the private messages feature in Esri Community; if you need to reach me, feel free to e-mail jtedrick@esri.com .