I have a super frustrating issue with a hosted feature layer and at this point am assuming that this is a bug in the Map Viewer Editor. I have a Web Map with a map service created specifically for testing purposes that contains a polygon layer and a table with a relationship class. The CustID field in the polygon layer is the foreign key and is also the field that needs to be populated when a new feature is created. This should not automatically disable editing for the field. When I add a new feature to the polygon layer however, the CustID field in the Editor is disabled for editing, but I AM able to edit the field from the attribute table. This leads me to believe that the issue is with the form and not the layer settings.
In the Form config for the layer, the field shows up as Read-only and Editing is apparently disabled in the field settings:
The problem is that I am unsure of what field settings this message is referring to. The field settings in the layer details seems to indicate that the field is editable:
Also, the field is not Read Only when published. The box is unchecked in the layer field properties:
One more thing of note is that the Details page for the layer does not have a Settings tab for some reason, which would be the only other way I know of to alter the edit settings for the layer:
<------------- No Settings Tab
At this point I could have saved a lot of time by just scrapping the map service and creating a new one, but I would like to understand what I am missing first, if anything.
Hi @FranklinAlexander , can you provide more information about what the relationship is (feature to table? 1-> many? Composite?) and can you confirm if you are using a GlobalID for the foreign key? Or is it a manual entry key?
On other thing to check is that all the layers in the relationship are in the webmap.
Finally, is the foreign key generated after you create the feature? So, create a polygon then back out and reselect it. is the field still empty and greyed out?
Hi @bbollin, thanks for the assist. Here is the relationship info:
The boundaries layer and the Customer table have GlobalIDs, but are not being used as a primary/foreign key, nor do I wish to do so. I did finally figure out that I could just select the 'Records' link for the record in the Customer Info table that I wish to relate to the new property boundary, then select 'Create record' in the Property boundaries panel that opens. This even autofills the CustID, so no need to manually input anything! There are scenarios, however, where a boundary is created when no customer record yet exists. I kind of solved this by creating a new customer record and leaving the rest of the form blank to be filled out at a later date. Now there is a new customer (at least a new CustID) that I can attach the new boundary to. I think this might be a good solution, but I am assisting other staff with this, so it will be up to them to decide if it works for their needs.
I am still a little confused about the CustID field being disabled, would like to know if this is a default behavior or if I am missing something. Could come up again down the road!
@FranklinAlexander, from this it seems like your relationship is a table -> feature relationship, is that right? If so, table to feature relationships aren't supported yet (feature to table and feature to feature are supported) in the form, so that'd explain what is causing you trouble
I think you may have to use GLobalIDs for relationship keys if you are going to edit over the web..??
@ChrisStiwinter1 technically you can configure non GlobalID relationships from Pro and publish them to AGOL. That being said, it is strongly advised against due to some odd scenarios you can get into