Select to view content in your preferred language

"The form contains unsupported data" error when tried to add survey results when offline in mobile Field Map

397
3
Jump to solution
04-05-2024 07:22 AM
MattSully
New Contributor III

On our Moorland Bird Survey app we are putting together for the surveyors.  One of the layers is coming up with 'The form contains unsupported data'  Now looking at it we have used Arcade for Now() for when updated, using the Arcade for updating a field based on another to get the grid location.

We have a variety of Combo boxes....

This only happens when we use it offline.  Online no problem at all.

Moorland Breeding Bird Map - Form (arcgis.com)

We have not used any reserved words for ESRI products, like shape_length, DELETE etc.

Not really sure what to do next on this, it works in the field very well, just this last hurdle to get over.

Thanks 😊

Matt

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
KathleenCSki
New Contributor III

based on this example:

var code = $feature.codedValue;

var decodedValue = Decode(code, 1, 'Residential', 2, 'Commercial', 3, 'Mixed', 'Other');

________________________________________________________________________________________

On this line:  breed_status = Decode($feature.Doing,

Try: breed_status = Decode(originalValue,

View solution in original post

3 Replies
gis_KIWI4
Occasional Contributor II

@MattSully  - Are you able to share the arcade used? 
It's good that you have narrowed it down to the arcade function being used. 

0 Kudos
MattSully
New Contributor III

Yes of course,  @gis_KIWI4. I will document the variety of simple arcade functions below:

1) When surveyed

Now()
 
2)  Insert Grid Square

// Create a feature set using the 'OS 1km Grid' layer in the map
var regions = FeatureSetByName($map, 'OS 1km Grid', ['name']);

// Intersect the current location with the regions and
// get the first region
var region = First(Intersects($feature, regions));

// If the current location does intersect a feature,
// return the name of the region. Otherwise, return null
if (!IsEmpty(region)) {
    return region['name'];
} else {
    return null;
}
 
3)  Activity to Breeding Status
 
// Declare breed_status variable
var breed_status;

// Get the value from the original field
var originalValue = $feature.Doing;

// Determine breeding status based on original field value using Decode() function
breed_status = Decode($feature.Doing,
                      'Singing', 'Possible Breeder',
                      'Pair in suitable nesting habitat', 'Probable Breeder',
                      'Observed in suitable nesting habitats', 'Probable Breeder',
                      'Agitated behaviour', 'Probable Breeder',
                      'Holding permanent territory', 'Probable Breeder',
                      'Nest building or excavating', 'Probable Breeder',
                      'Visiting nest site', 'Probable Breeder',
                      'Recently fledged young, or downy young', 'Confirmed Breeder',
                      'Family party', 'Confirmed Breeder',
                      'Adults carrying faecal sac or food for young', 'Confirmed Breeder',
                      'Nest containing eggs', 'Confirmed Breeder',
                      'Nest with young seen or heard', 'Confirmed Breeder',
                      'Flying over', 'Non Breeding',
                      'Unknown' // Default value
                     );

// Return the determined breed_status
return breed_status;
 
As you can see there are only a couple of Arcade function that calls other layers, even though they have been shared to be used offine, something doesn't seem to pull through and give a result.
 
Thanks
0 Kudos
KathleenCSki
New Contributor III

based on this example:

var code = $feature.codedValue;

var decodedValue = Decode(code, 1, 'Residential', 2, 'Commercial', 3, 'Mixed', 'Other');

________________________________________________________________________________________

On this line:  breed_status = Decode($feature.Doing,

Try: breed_status = Decode(originalValue,