|
POST
|
Note this does not stop them from just using the attribute table in the map (which is what most of our users do). They can get around all of it in Pro also. Safest way is a view as listed below.
... View more
04-13-2026
01:36 PM
|
0
|
0
|
866
|
|
POST
|
I also updated your script to have it turn whole layers off in one config line and a list per layer telling only which fields to turn ON. That was my use case. Does it in a single call also. Works slick! Did 37 layers 4,000 fields in a few mins. Thanks! # --- Configuration ------------------------------------------------------------
VIEW_ITEM_ID = "View Item ID" # your view item id
# Turn OFF editing for ALL fields for these layer/table IDs (one call per layer/table).
FULLY_DISABLE_LAYER_IDS = [2,3,4]
# For these layer/table IDs, leave editing ON only for the listed fields.
# All other currently-editable fields will be turned OFF in a single call.
# 0 is Points and 1 is Field Visits
ALLOW_EDIT_FIELDS_BY_LAYER = {
# Example:
0: ["StreamName", "OfficeEvaluator"],
1: ["ReasonNotSampled", "PDFgenerate"],
}
# Optional: For layers in this list, leave *only* GLOBAL_ALLOWED_FIELDS editable.
# (This preserves your original behavior where some layers keep a short allowlist.)
EDIT_DATASET_IDX_LIST = [] # e.g., layer 0 uses the global allowlist
GLOBAL_ALLOWED_FIELDS = []
# Behavior controls
CASE_SENSITIVE_FIELD_MATCH = False # False means case-insensitive matching by field name
DRY_RUN = False # True = print intended changes, do NOT call update_definition
# --- Script -------------------------------------------------------------------
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
def norm(name: str) -> str:
return name if CASE_SENSITIVE_FIELD_MATCH else name.lower()
# Connect to the view item and get the layer collection
gis = GIS("Pro")
view_item = gis.content.get(VIEW_ITEM_ID)
if view_item is None:
raise Exception(f"View item not found: {VIEW_ITEM_ID}")
view_flc = FeatureLayerCollection.fromitem(view_item)
# Iterate through layers and tables
view_datasets = (view_flc.layers or []) + (view_flc.tables or [])
for ds in view_datasets:
ds_props = ds.properties
ds_id = ds_props.get("id")
ds_name = ds_props.get("name", f"id:{ds_id}")
fields = ds_props.get("fields", [])
mgr = ds.manager
# Decide the mode for this dataset
# 1) Full disable list wins
if ds_id in FULLY_DISABLE_LAYER_IDS:
updates = []
for f in fields:
# Only touch fields that are currently editable
if f.get("editable", False):
updates.append({"name": f["name"], "editable": False})
if updates:
payload = {"fields": updates}
if DRY_RUN:
print(f"[DRY RUN] {ds_name} (id={ds_id}) -> disable ALL editable fields ({len(updates)}).")
else:
mgr.update_definition(payload)
print(f"{ds_name} (id={ds_id}) -> disabled {len(updates)} editable fields in one call.")
else:
print(f"{ds_name} (id={ds_id}) -> no changes (no fields marked editable).")
continue # Done with this dataset
# 2) Allow-only list per layer
allow_only = None
if ds_id in ALLOW_EDIT_FIELDS_BY_LAYER:
allow_only = set(norm(n) for n in ALLOW_EDIT_FIELDS_BY_LAYER[ds_id])
# 3) If not per-layer allowlist, check if this dataset is in your classic list
# that should keep only GLOBAL_ALLOWED_FIELDS editable.
elif ds_id in EDIT_DATASET_IDX_LIST:
allow_only = set(norm(n) for n in GLOBAL_ALLOWED_FIELDS)
updates = []
if allow_only is not None:
# Turn OFF any editable field that is NOT in the allowlist.
for f in fields:
if not f.get("editable", False):
continue
if norm(f["name"]) in allow_only:
# Leave it editable; no change required.
continue
updates.append({"name": f["name"], "editable": False})
else:
# Default behavior: if the dataset is not in any configured list,
# do NOT change anything. If you prefer the old behavior (disable all),
# uncomment the following to disable all editable fields by default:
#
# for f in fields:
# if f.get("editable", False):
# updates.append({"name": f["name"], "editable": False})
pass
# Apply (in one call) if there are updates
if updates:
payload = {"fields": updates}
if DRY_RUN:
print(f"[DRY RUN] {ds_name} (id={ds_id}) -> disable {len(updates)} fields not in allowlist.")
else:
mgr.update_definition(payload)
print(f"{ds_name} (id={ds_id}) -> disabled {len(updates)} fields in one call.")
else:
print(f"{ds_name} (id={ds_id}) -> no changes required.")
print("Finished.")
... View more
04-13-2026
01:34 PM
|
1
|
0
|
866
|
|
POST
|
@MobiusSnake This is great was just looking at this today thinking how am I going to turn off 4,000+ fields. I wish we could turn off whole layers like you can for geometry. Right here I can turn off all geo why can't I also turn off all editing using a layer list vs forcing me to do each and every field. Not very scalable here. Is there any setting at the layer level or is it field only? thanks
... View more
04-13-2026
12:11 PM
|
0
|
1
|
871
|
|
POST
|
Is this Portal? We have been seeing this setting here getting turned on by default now in Portal and we have to turn it off. Not sure why its suddenly doing that. It caused what you are seeing can edit online but not offline. Hope that is it
... View more
04-10-2026
11:25 AM
|
2
|
0
|
969
|
|
POST
|
Upvoted! We are a massive company and we can get stuck if a single person is out. Simply cannot have that. Thanks a lot
... View more
04-10-2026
08:18 AM
|
1
|
0
|
631
|
|
IDEA
|
Ran into this today with Views. We need collab members to be able to update pretty much anything. Basically if one person is out we are totally stuck. We cannot have one point of failure at a multi-billion dollar company. I would not consider this restriction enterprise class. We run into these blocks a lot. Thank you
... View more
04-10-2026
08:17 AM
|
0
|
0
|
337
|
|
POST
|
Sounds like they will have internet access? I would make a Dashboard and it could be slick. You could color code, etc and use launch links to open the forms into 123 app. Dashboard works decent on a tablet browser. Could do experience builder also but its a learning curve there.
... View more
04-09-2026
02:37 PM
|
1
|
0
|
446
|
|
POST
|
Weird I have never once used the portal part and you seem to be pointing to AGOL so its not needed. I also see you have the HTML for the & symbol vs the actual symbol but not sure if that is just this website doing that. the best way to post a URL is right click text only or it shortens it and I cannot read it. Also Shift-CTRL-V works. Then can read like this Mine are simply arcgis-survey123://?itemID=3550e08aaef94b139a3169d9e24d3dd0&field:PointID={PointID} Is this on all features our just 1? Weird that it was working.
... View more
04-07-2026
03:18 PM
|
0
|
1
|
619
|
|
POST
|
I cannot see the entire URL since it cuts off, paste plain text so we can see it all. Typically I remove one field at a time to find the exact one it does not like. It can be wrong type, the data is too large to fit in the field, special chars in the field, bad field name, reserved work used, etc. Try and track down the exact field and you will prob see the issue.
... View more
04-07-2026
08:57 AM
|
0
|
4
|
660
|
|
POST
|
We do this and went straight repeat. Each repeat is one plant and an abundance value. Storing species as a list from a select multiple becomes a nightmare and not very useful. You will want one table record per species in the end. Better yet add GPS to the repeat and have a point per species. It does take the crew a little bit longer but its worth it. We have a dup checker built in also. And a running list so they can see if they already added it. Our species list are 60,000 long with code, scientific name, and common name as the label so you can search on any of them at once. Its slick. We share forms if you would like to see it. Hope that helps
... View more
04-07-2026
08:33 AM
|
1
|
0
|
407
|
|
POST
|
Same here about half our images are from before we used tablets so they have no GPS. I saw at dev summit a way to add them from a table but cannot find it now. I think it was maybe here https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/oriented-imagery-table.htm When building the image list it just skips them so I cannot fix them. I wish it would add them all then I can join to my layer that has x/y and I am done. Seems now I have to find a way to build a table of just the missing images then add from CSV. Still not sure what to set camera heading to. I think I need to make a script to get a list of all images, then filter out what was already found, then add x/y, then add the path then add to the dataset? Is there an easier way? We just want a simple way to at least see the images that have no GPS metadata but we know where about there were taken. thanks for any input @NeeteshBhati is the one that gave the demo.
... View more
04-06-2026
09:47 AM
|
0
|
0
|
495
|
|
POST
|
It will on new records but not old records. Which makes sense how would it kick off a job to fill all those out? As others posted you can join on your relate and calc over the globalid to get started. Personally I have 2 relates, one with my own key and one to make 123 happy. I got a write up on it here. https://community.esri.com/thread/221263-mapping-with-survey123-within-a-polygon-or-admin-unit Hope that helps
... View more
04-06-2026
07:08 AM
|
0
|
0
|
808
|
|
POST
|
Upvote from us also. We are required by law to be compliant and now we cannot in ExB. thank you
... View more
03-30-2026
08:25 AM
|
0
|
0
|
577
|
|
POST
|
I do not think you can start a field name with an underscore.
... View more
03-27-2026
12:59 PM
|
0
|
0
|
436
|
|
IDEA
|
Field Maps Designer does a bit of a better job blocking things that will not work in Field Maps vs the web form builder. It is what you should use to build forms. Give that a try. Its not perfect still but better.
... View more
03-27-2026
09:00 AM
|
0
|
0
|
630
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 1 | 2 weeks ago | |
| 1 | a month ago | |
| 1 | a month ago | |
| 1 | a month ago |
| Online Status |
Online
|
| Date Last Visited |
30m ago
|