ArcGIS Online Map Viewer Editor Doesn't Prompt for Form

494
7
06-06-2022 01:18 PM
10KYIGIS
New Contributor II

Hi there,

I'm trying to make use of the editing tools available in the new Map Viewer, especially with the Form that allows for Contingent Values and Calculated Expressions - as shown in this post: Getting the most out of editing in Map Viewer and ArcGIS API for JavaScript (esri.com)

I have a map with a couple of feature classes (one with points, one with polygons) and am unable to get the Editor tool to Create features and prompt user for the form - It just freezes up for me, whenever I try to click create for a new feature from my existing feature templates.

Are there some configuration settings I am missing to allow this? My feature layers have editing enabled, but when trying to create features I am unable to. Or is this functionality only for use via coding in the API in a custom application, and not the Out-of-the-Box Map Viewer?

Thanks! 

0 Kudos
7 Replies
RussRoberts
Esri Notable Contributor

Can you share the layers and map with the form you authored?

10KYIGIS
New Contributor II

Unfortunately, not the current version - I'll see if I can create something suitable for public sharing.

I must have missed this, but there is an alert by the Calculated Expressions section stating: "Calculated expressions that use Feature Sets are not supported in Map Viewer." So I assume that at some level my Feature Layer is using, or part of a Feature Set? Unsure if that is an issue preventing editing.

However, I tried putting the same Feature Layer on a blank map to test, and was able to configure the form and it would do Conditional Visibilities, and a simple Calculated Expression for area from use Length and Width populated correctly. It may have been an issue with the original Web Map? We've been transitioning some older maps from Map Viewer Classic to the Map Viewer, and this map may have been copied from Classic and saved as a new map viewer - and may have carried with it some bugs potentially. Not sure. I will configure some more of the form and see if the issue is resolved.

0 Kudos
10KYIGIS
New Contributor II

Through further exploration, I've found that the issue is coming from trying to write something in Arcade that will auto-populate a date field with the current date and time of editing.

I've tried using both return(now()) and now() and any time that calculation is enabled for a field, I only get a prompt for the 'Create' button, which upon pressing fails to create the feature or the Create prompt fails to appear at all.

Anytime I remove the now() calculation, the Form works as intended, with all subsequent conditional visibility and area calculation expressions performing as desired.

0 Kudos
JCooley_ClackamasSWCD
New Contributor III

The form editor in the new map viewer is still problematic.  I have stopped trying to use it since it tends to freeze up on me almost every time I try to save, close or cancel.  Fortunately, I can get everything done by using Field Maps Designer to modify the forms we use in Field Maps.    

Is this a documented bug? 

0 Kudos
RussRoberts
Esri Notable Contributor

I just took a quick look and I don't see anything form related in our support tickets matching this form issue.  I would submit this case to support to get an bug ID to track. 

0 Kudos
JCooley_ClackamasSWCD
New Contributor III

It might be worth noting that our forms use a good bit of Arcade.  I also discovered that a bad bit of Arcade code that I was trying to use in another web map caused the Map Viewer to partially lock up. 

Description of the buggy behavior:  If I try to edit a point the edit pan gives me the spinning circle.  The map viewer will still let me minimize the edit tool pan but the pop-ups stop working.  I can expand the edit pan, but I get the spinning wheel.  I can still pan the map.  

I removed this Arcade code from the calculated field for the layer I was working with, and the problem disappeared:

// Set date and time to now if the field is empty.  This prevents field users from changing the date if they //need to edit a previous observation point in Field Maps.

if (!IsEmpty($feature.ObservationDate)){
  return
}
Else {
  now()
}
 
Is poorly written Arcade code messing with the Map Viewer a documented issue? 
0 Kudos
RussRoberts
Esri Notable Contributor

I don't have an issue matching that. If you can submit a support ticket along with sample map & layer that would be great thanks! 

0 Kudos