Select to view content in your preferred language

Restrict editing to related record only; not allow adding new features to parent layer?

4167
17
04-15-2022 10:02 AM
Caitlin_Todd_LCOR
Regular Contributor

Hello all, 

I'm hoping this functionality is available in ArcGIS FieldMaps and I'm just missing where to configure it.

I have a 1:M feature layer between Sites and Inspections. I'm developing a map for field crews to go out and add new inspection records to sites. BUT, I cannot allow them to add/delete/update locations of sites. 

I tried restricting editing to only allow for attribute updates, but that also removes the ability to add new related records in the inspection table.

Is this workflow possible in ArcGIS FieldMaps right now? Is it on the roadmap sometime in the near future?

Thanks!

Caitlin

17 Replies
Amanda__Huber
MVP Regular Contributor

This is the behavior we're seeing as well. 

0 Kudos
Caitlin_Todd_LCOR
Regular Contributor

Found a bit of a catch 22, any form expressions on the parent layer won't fire if there was an edit on the related record. So the parent layer would need to be editable for at least attributes only. Then the user would have to edit the parent point, wait for the form calc to run, then submit the edit. 

SvenBuchmann
Occasional Contributor

In case someone else comes across this issue and wants to deactivate editing of the parent Layer: Select the parent layer in Map Viewer and disable Editing under Properties. In Map Viewer Classics click on the three dots next under the parent layer and disable Editing

StefanUseldinger
Frequent Contributor

Thanks! It seems, that this option is missing for (related) tables. So I added the property manually in the map config:

"capabilities": "Query",

0 Kudos
Amanda__Huber
MVP Regular Contributor

This doesn't quite work for the new map viewer. With this setting, editing is completely disabled for both parent and related table. 

In order to edit the related table (and see the edit button) you need to have editing enabled on the parent point layer.

That being said, back to the initial post- we need the ability to add/update related records but not allow parent layer geometry edits. Currently in the new map viewer and JS 4x instant apps, I don't see this capability. 

 

Thanks,

Amanda Huber

0 Kudos
Amanda__Huber
MVP Regular Contributor

Alright ya'll after hours of testing this, I think I found a workaround for this issue:

  1. In ArcGIS Online MapViewer, access the form settings for your parent point layer.
  2. Add a 'text type' field to your parent point layer form (it can be any field that already exists in your dataset). 
  3. Set the max length of that field to be "0" and make the field required

    Amanda__Huber_0-1714078641423.png

     

  4. Set the visibility of this field to be "GlobalID is EMPTY"- since global IDs aren't generated until an edit is submitted, this will ensure it shows up when trying to edit a point and doesn't show up on your related records form
    Amanda__Huber_0-1714080074133.png

     

Now when users try to edit the parent point they are unable to and receive this error.
Alas, they are unable to enter anything into the required field because it's restricted to ZER0:
(tested in both Map Viewer and Instant Apps)

Amanda__Huber_1-1714078733594.png Amanda__Huber_2-1714078736822.png

 

I fully acknowledge this is a super stupid workaround but it works, and solves the problem. 

Ideally Esri should look into this issue, and create a workflow for those who only need related records editing (and not the points) but that's a different challenge. 

Hope this helps someone out there!

Best, 

Amanda Huber

 

 

Zrobinson_SFPUC
Occasional Contributor

I've posted this as an idea for Esri to review if it gets enough Kudos. Please up-vote if you can!

Restrict editing to related table only in Feature ... - Esri Community

 

0 Kudos
HeatherBell
Frequent Contributor

Hi, I tried to use @Amanda__Huber 's workaround, but it didn't work for me.

  1. I created a view layer specifically for Field Maps. 
  2. I managed to use map viewer classic to switch off editing for the parent layer (e.g. sites), and leave editing on for the related records (inspections). This carried through to Field Maps. However, it didn't carry through to the map if a user opens the view layer in the new map viewer, so it seems users could still edit this information if they go via this route, unless editing is restricted at the fields level. Also I don't think you can stop them from adding new points to the parent layer, unless you switch off editing completely. This is a problem for us because we get users to add data to the parent layer through Survey123 because we have a unique ID and other information which is pulled from a separate 'projects' layer, and I'm not sure that we can achieve the same thing through FieldMaps or through the map viewer yet. 

Not ideal, and still needs improved settings around this for related records. Basically any kudos on the idea above is going to be useful, it's a critical part of the workflow for inspections data within Field Maps and other apps. 

Thanks, 

Heather

GIS Analyst @ The Rivers Trust
0 Kudos