|
POST
|
i am trying to iterate the features from a feature service within ArcGIS Pro Notebook this is my code and it seems to connect to the feature service and returns the name correctly items = gis.content.search('title:LiveData owner:xxxxxx', 'feature layer')
OP1item = items[0]
PLS = OP1item.layers[11]
print(PLS.properties["name"]) xxSection but when i try and iterate it for x in PLS:
print(x) i get this error: ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
In [35]:
Line 3: for x in PLS:
TypeError: 'FeatureLayer' object is not iterable
--------------------------------------------------------------------------- any ideas what i'm doing wrong?
... View more
09-01-2021
02:14 AM
|
0
|
4
|
3550
|
|
POST
|
Is it possible to copy a parent feature and all it’s related features/tables from a feature service and paste it into the same feature service? I can copy each item in turn and change the parent global id but it takes time and I wondered if there was an easier way to do it thanks
... View more
08-20-2021
11:25 PM
|
0
|
1
|
928
|
|
POST
|
answered by own question.... sub = add_res.get("addResults")[0].get("objectId")
... View more
08-20-2021
03:02 AM
|
0
|
0
|
985
|
|
POST
|
so ive created a Notebook that adds a record into a table but i want to add the results objectID to a variable but i can't figure out how to get it this is my code that adds the record and prints the results but thats as far as i've got add_res = Hist.edit_features(adds = [hAdd])
print(add_res)
sub = add_res['objectid']
print(sub[0]) {'addResults': [{'objectId': 437, 'uniqueId': 437, 'globalId': 'D8CCE07Bxx9B8', 'success': True}], 'updateResults': [], 'deleteResults': []}
... View more
08-20-2021
02:50 AM
|
0
|
1
|
997
|
|
POST
|
the only solution i found was to create a new feature service, i didnt want to try re-publishing the original service Stu
... View more
08-06-2021
01:45 AM
|
0
|
1
|
3343
|
|
POST
|
i am trying to change a set of users licence in AGOL from Creator to Field Worker this is what i have but it dosent seem to work (no error or anything) from arcgis.gis import GIS
gis = GIS("home")
source_users = gis.users.search(query="username:xxx")
for user in source_users:
print(user.username)
print(user.userLicenseTypeId)
user.userLicenseTypeId = 'fieldWorkerUT'
print(user.userLicenseTypeId)
... View more
05-27-2021
09:10 AM
|
0
|
6
|
4854
|
|
POST
|
we still have this issue and its causing me more and more issues as i need to now create a replica but it fails on the layer with the duplicate field in
... View more
05-21-2021
02:39 AM
|
0
|
0
|
2449
|
|
POST
|
is it possible to use the AGOL REST endpoint to return a specific feature and all of the related child records without having to use the Query Related Records (Feature Service) i have tried with : Query (Feature Service) using: [{ "layerId" : 0,"where": "objectid = 10003", "outfields": "*", "includeRelated" : true},{ "layerId" : 1,"outfields": "*", "includeRelated" : true}] but it didn't work, and i couldn't work out how to pass the GlobalID from Layer 0 to the ParentGlobalID on layer 1 i don't really want to have to run 10 REST calls to get all the related records if i can do it all in 1 fingers crossed someone has done this.... thanks Stu
... View more
05-18-2021
08:40 AM
|
1
|
0
|
1038
|
|
POST
|
i've deleted the 3 features with errors and rebuild the indexes again but still get the same error i'm always nervous about re-publishing in case anything gets messed up in the process... Stu
... View more
04-28-2021
01:57 AM
|
0
|
0
|
3588
|
|
POST
|
ive exported it to an FGDB and it worked fine, just ran the check geometry tool in Arc Catalog and its highlighted 3 features with errors: WARNING 000442: short segments at 29505
... View more
04-28-2021
01:18 AM
|
0
|
0
|
3588
|
|
POST
|
get the same error in Pro as the WebMap when trying to create a new feature
... View more
04-27-2021
03:04 AM
|
0
|
1
|
3598
|
|
POST
|
strangely i get the same error when trying to manually create the feature in a webmap, its as thought the indexes are corrupt on the feature service [{
"attributes" : {
"SUBTYPE_" : 11,
"ID" : "52",
"OWNEr" : "5",
"MATERIAL" : "un",
"PrimeDriver" : "TEST",
"CompletedWhen" : null
},
"geometry" :
{
"paths" :
[
[
[400000, 288000],
[400001, 288001]
]
]
}
}] the above is roughly what i was trying to use
... View more
04-26-2021
08:52 AM
|
1
|
0
|
3621
|
|
POST
|
so i'm trying to add a new feature to an AGOL feature service using the Apply edits REST API the feature service is a polyline and i get this error: {
"addResults" : [
{
"objectId" : null,
"uniqueId" : null,
"globalId" : "5ED16305-D978-4C4F-951F-B87FC1479927",
"success" : false,
"error" :
{
"code" : 1000,
"description" : "Invalid column name 'Shape_5'.\r\nInvalid column name 'Shape_7'.\r\nInvalid column name 'Shape_9'.\r\nInvalid column name 'Shape_11'.\r\nInvalid column name 'Shape_13'.\r\nInvalid column name 'Shape_15'."
}
}
]
} i have even queried an existing feature and tried to re-add it using its JSON and get the same error any ideas? thanks Stu
... View more
04-26-2021
07:26 AM
|
0
|
10
|
4188
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-16-2025 02:25 AM | |
| 1 | 09-08-2025 07:14 AM | |
| 8 | 07-17-2025 01:23 AM | |
| 3 | 07-04-2025 02:55 AM | |
| 1 | 06-27-2025 03:41 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-17-2026
05:42 AM
|