Select to view content in your preferred language

Survey123 April 2022 now available in Beta

2715
10
04-08-2022 10:02 AM
IsmaelChivite
Esri Notable Contributor
12 10 2,715

 

The Survey123 April 2022 update will include a handful of focused fixes and support for Bulgarian language. Our plan is to make this release available on April 21.

You can now access it through the Survey123 Early Adopter website. You will find instructions to load the beta version of the Survey123 website and web app in your browser and the Beta versions of Survey123 Connect and the field app.  The Early Adopter forums are open for your feedback as well.

 

Survey123 Website and web app

  • BUG-000144856 When filtering single choice questions in the ArcGIS Survey123 website by unique values, blank drop-down entries are displayed in place of removed choice options.
  • BUG-000147917 Survey123 web app does not enforce the count-selected(${image_question_name}) constraint for an image question with multiline appearance if the survey title contains any upper-case letter when publishing the survey for the first time.
  • ENH-000140973 Provide a confirm button in Survey123 website in a mobile device while filling a geopoint in survey to make it similar to Survey123 Field application
  • BUG-000137843 When the ArcGIS Survey123 web app returns the error message, "Error: Initializing form...", due to failure to load the CSV file, the error message does not fit in the dialog window.
  • BUG-000147360 Performing statistics on a nested repeat layer outputs unexpected results if the main record does not have any nested related records
  • ENH-000138984 Allow user to retrieve the number of unique values from a field in a survey report

Survey123 Connect and field app

  • BUG-000145239 Unable to download public surveys with anonymous access disabled in ArcGIS Enterprise has been fixed.
  • BUG-000147656 The ArcGIS Survey123 field app does not show the existing values properly for a select_one question with the autocomplete appearance and a default value has been fixed.
  • BUG-000147935 A question field with an autocomplete appearance within repeat navigates to the name of the choice, instead of a label has been fixed.
  • BUG-000147451 Relevant expressions using fields based on previous questions with default values in Survey123 field app do not populate as expected has been fixed.
  • BUG-000147571 Default value used in choice filter fails to load choice lists on subsequent repeats with autocomplete appearance has been fixed.
  • Relevant or calculate expressions that null a value and do not get updated in the feature layer has been fixed.
  • Leading zeros being truncated when submitting from the Inbox has been fixed.
  • An issue causing images collected with the Spike app not displaying correctly has been fixed.
  • An issue with .mp4 attachments being uploaded with the incorrect content type has been fixed.
  • An issue with select_one_from_file selections not being visible in the Inbox when choice labels are integers has been fixed.
  • Added ability to connect to a GNSS receiver using an output baud rate other than 4800.

 

Tech preview: pulldata("@layer")

Many of you have requested that we enable the use of custom JS functions in public surveys. For security reasons, that is unlikely going to happen. Having said this, we are identifying common uses of custom JS functions with the intent of bringing those as built-in functions.  In this way, we make authoring easier on you and also allow execution in public surveys.

Overwhelmingly, the most common reason why we see you using custom JS functions is to query layers. This includes spatial queries such as point-in-polygon and attribute queries. We want to support this by extending the pulldata() function:

  • pulldata("@layer","getRecordAt","<URL>,<LOCATION>,<WHERE filter>)
  • pulldata("@layer","getRecord","<URL>,<WHERE filter>)

The output of the pulldata("@layer") operations is a JSON object representing a single feature. Using pulldata("@json") you can extract the attribute data you want and use that in calculations, constraints or expressions to control the visibility of form elements.

Here is a live example showing how you can use a point-in-polygon query to calculate a value.

The new pulldata("@layer","getRecordAt") function allows you to query a layer without the need for custom JS codeThe new pulldata("@layer","getRecordAt") function allows you to query a layer without the need for custom JS code

Here is another live example showing how you can you use pulldata("@layer") to make sure the user adds a point within a particular polygon.

 

You can use pulldata("@layer") in constraints. For example, to prevent users from submitting locations outside of your area of interestYou can use pulldata("@layer") in constraints. For example, to prevent users from submitting locations outside of your area of interest

 

This new pulldata("@layer) function is at this moment only supported in the Survey123 web app. You will need to author your form in Survey123 Connect and test your work in the Survey123 web app. The preview in Survey123 Connect will ignore at this moment your pulldata("@layer") syntax.  Although this feature is not officially supported yet, your pulldata("@layer") calls will work fine with the released version of the web app once your survey is published.

Learn more about pulldata("@layer") through the Early Adopter documentation. If you have feedback, please use the forum in the Early Adopter Program.

Subject to your feedback, we plan to add for support pulldata("@layer") in Connect and the field app in May/June October/November and officially document and support this feature in the July 2022 update before the end of 2022.

10 Comments
FRSadmin
New Contributor III

Hello @IsmaelChivite 

I know this is a very small issue possibly, but I am really hoping that the today() or now() function can be impleted to display seconds in time questions.

This is literally the last hurdle I need to clear before my team can use the survey we made and I have tried to recreate something similar in Quick Capture but am running into different issues there.

Is this being considered at all?

KyleWikstrom
Occasional Contributor II

HOORAY for pulldata("@layer")!!

This capability, coupled with Linked Content maps that have Enable Search By Layer in the Application Settings helps organizations support their general public stakeholders submit surveys where spatial and nonspatial data integrity is better ensured.

Use case: Public-facing Property Tax Assessment Appeals Survey123 form that leverages Linked Content - a web map containing a tax parcel layer for visual representation and a tax parcel point layer that supports the point-in-polygon pulldata capability. The web map Application Settings are configured to search for tax parcel [point] using parcel identification number or site address. The tax parcel point layer ensures that the form user places the geopoint where internal stakeholders want it, provided that they use the geopoint question's Search capability, and the point layer is used in the pulldata capability to query the tax parcel layer and populate survey questions with information about the parcel.

The value proposition:

  1. Streamline the submission of forms
  2. Better ensure the quality of the spatial and nonspatial data

Thanks for sharing this update. Looking forward to learning more through the EAP!

Anneka_France
Occasional Contributor III

@IsmaelChivite this is great!

Did this get added to the general release in the July update? Can't see it in the 'What's new?' section.

I wanted to use this to pull locations from an existing layer (sampling points) and calculate the location for the geopoint in the new survey. I did notice that "Snapping on map questions" has been added in the web map. Does that mean I can set it to 'snap' the geopoint to a linked map layer? There doesn't seem to be any documentation explaining this yet.

Thanks!

IsmaelChivite
Esri Notable Contributor

@Anneka_France  Unfortunately pulldata("@layer") is still not available in production. New release planned date is towards the end of 2022.

Anneka_France
Occasional Contributor III

Thanks for the update @IsmaelChivite. Fingers crossed for the next release 🤞

IlkaIllers1
Occasional Contributor III

Hello @IsmaelChivite !

I never got this to work in my forms. I thought the idea was that I wouldn't need custom JS code/ to use pulldata(@json), but now this has been crossed out in the above text? 

I don't know any JS and I am a little stuck on this - can't find any examples or explanations of what exactly I am trying to do, so I was wondering whether it is even possible to get this to work how I want it too.

Is it possible to query a feature layer from a linked map using pulldata(@layer) at the moment?

Thanks!

IsmaelChivite
Esri Notable Contributor

Hi @IlkaIllers1   The release of pulldata("@layer") has been delayed, but you can still explore how it works using the Survey123 web app. The purpose of pulldata("@layer") is to help you do a layer query without the need for a custom JS function.

If you can share your XLSForm, I may be able to help. It is possible that you may have missed something. 

Alternatively, watch https://community.esri.com/t5/arcgis-survey123-videos/point-in-polygon-queries-coming-to-the-survey1...  to see how you can do layer queries using the web designer beta.

 

StanislausCounty
New Contributor III

@IlkaIllers1  It hasn't been released yet. To get the information you still need to use custom js to get and return data. Here is an example that would return an attribute called situs_address from the Public_Parcels feature layer based on the intersection of the geopoint in the survey:

function runAddQuery(Lat, Long){
    try {
        if (Lat == null || Long == null){return "";}

        var xmlHttp = new XMLHttpRequest();
        let epsg = "&inSR=4326";
        let coord = "geometry="+Long+","+Lat;
        let format = "&spatialRel=esriSpatialRelIntersects&units=esriSRUnit_Foot&outFields=situs_address&f=json&returnGeometry=false";
        let location = coord+'&geometryType=esriGeometryPoint'+epsg+format
        let url = 'https://myenterpriseportal.com/arcgis/rest/services/Hosted/Public_Parcels/FeatureServer/0/query?'+lo...;

        //Make request
        xmlHttp.open("GET",url,false);
        xmlHttp.send();
        if (xmlHttp.status!=200){
            return null;
        } else {
            var responseJSON = JSON.parse(xmlHttp.responseText);
            if (responseJSON.error){
                return null;
            } else {
                if (responseJSON) {
                    let streetAdd = responseJSON.features[0].attributes.situs_address;
                    return streetAdd
                }
            }
        }
    } catch (TypeError){
        return null
    }

}

 

IlkaIllers1
Occasional Contributor III

Thanks @IsmaelChivite 

I have definitely missed something, since I was simply trying to use the pulldata(@layer) function in my XLS form (I must have misunderstood, thought that function was released back in June). Unfortunately, my surveys are all in Connect and I think there were reasons why they didn't work in the web designer (I think I wanted to use web maps with feature layers as a base map and at least back then that wasn't possible in the web app). 

@StanislausCounty thanks for the code. I might play around with it and try it out, but I find it hard to adapt code that I don't really understand, so chances are I won't get it to work. Will have to wait for the pulldata(@layer) release. Or learn JS. 

SFM_MickieSmith
New Contributor III

Is there a way to pull data from a hosted feature layer so it can be used to build the choice list in survey123 instead of using a CSV file? We want the list to be dynamic.  Not sure if the pulldata("@layer") or the search appearance function will work. We want the list to only display unique values instead of all the data from the hosted feature layer (e.g., incident number or unit identifier).