|
POST
|
Hello, not sure if I'm just unable to find where it has moved to or if it was removed entirely, but prior to the most recent update there was an 'Info' button in the top menu where you could check the version of each package/module being used by the current version of Notebooks you had open. This was very helpful in troubleshooting. Does anyone know where it can be found, now? Or if it was removed, please consider re-adding it?
... View more
06-24-2022
09:52 AM
|
0
|
2
|
1252
|
|
POST
|
@Luke_Pinner Thanks so much, had the same problem and this did the trick for me. Had tried reinstalling Pro but that didn't solve it. Not on any sort of work or school network as Ryan suggested, so not sure what causes this.
... View more
05-30-2022
09:23 AM
|
2
|
0
|
3570
|
|
POST
|
Hi @KevinBurke , For this specific project, we are using just one ArcGIS Online hosted feature layer. We are able to complete the download of the offline area. The problem occurs when we go to create a new feature (points, in our case): the contingent values do not appear as 'Recommended' in the dropdown, nor do any of the contingent fields auto-populate when there is only one possible value, based on previous choices. This workflow functions normally when not using an offline area (recommended values appear, certain fields auto-populate). Thanks,
... View more
05-20-2022
10:09 AM
|
0
|
0
|
4111
|
|
POST
|
Hello. It appears that the support for contingent values added in the May 2022 update only applies when working online. We have a project where contingent values created in Pro will work as expected in the Field Maps mobile app (Android) while working online, but once you create an offline area, they no longer function in the app. No other changes to the project were made. Is this a known issue or expected behavior? I haven't been able to find it referenced in the documentation anywhere. https://doc.arcgis.com/en/field-maps/android/help/fill-out-forms.htm#ESRI_SECTION1_7E7EF23C996E4EA7AB5986540DF2D812 Thanks.
... View more
05-17-2022
12:46 PM
|
4
|
17
|
6656
|
|
POST
|
@heatherdawsorry I forgot the top bit of the script which imports strftime and defines the username and home directory. Edited the original post above to include those at the top.
... View more
05-12-2022
08:32 AM
|
0
|
0
|
3678
|
|
POST
|
@heatherdaw this is the full script I'm using to create a backup fgdb of a hosted feature layer in my content. It overwrites the existing backup each time. Hope that helps. from arcgis.gis import GIS
from time import strftime
gis = GIS("home")
username = gis.properties.user.username
home_dir = os.path.abspath(os.path.join(os.sep, 'arcgis', 'home'))
# Variables
itemid = "000abc000abc000abc000abc000abc00" # AGO layer to backup
itemtype = "File Geodatabase" # export format
itemtags = "backup, fgdb" # item tags
itemdesc = strftime("This backup was generated on %m/%d/%Y.") # item description
folderlocation = "/" # export folder, / is root folder
# Check to see if a backup file geodatabase already exists
dataitem = gis.content.get(itemid) #fetch the item to be backed-up
backupname = f"{dataitem.title} Backup" #acquire backup name using the source hosted feature layer
searchquery = f"title:{backupname} AND owner:{username}" # search query using item title and owner
searchresult = gis.content.search(query=searchquery, item_type=itemtype, sort_field='uploaded', sort_order='desc') #search for existing backups
print(f'Found {len(searchresult)} existing backups')
# Update existing backup item, if it exists
if len(searchresult) >= 1:
print('Updating existing backup file...')
dataitem = gis.content.get(itemid) #fetch the item to be backed-up
backupname = f'{dataitem.title} Backup' #create a name for the backup using the existing item name
dataitem.export(backupname, itemtype, parameters=None, wait=True, tags=itemtags, snippet = itemdesc, overwrite=True) #export the data to a file geodatabase within the user's content
searchquery = f"title:{backupname} AND owner:{username}" # search query using item title and owner
searchresult = gis.content.search(query=searchquery, item_type=itemtype, sort_field='uploaded', sort_order='desc') #find the new temporary backup item that was just created
backupitem = gis.content.get(searchresult[0].itemid)
dwnldname = backupname.replace(" ","_")
backupitem.download(save_path=home_dir, file_name=dwnldname + '.zip')
searchquery = f"title:{backupname} AND owner:{username}" # search query using item title and owner
searchresult = gis.content.search(query=searchquery, item_type=itemtype, sort_field='uploaded', sort_order='asc') #search for the previous backup
oldbackup = gis.content.get(searchresult[0].itemid)
itemprops = {"snippet":f"{itemdesc}","description":f"{itemdesc}"}
oldbackup.update(item_properties=itemprops, data = os.path.join(home_dir, dwnldname, '.zip'))
backupitem.delete(dry_run=False) #Can change dry_run to True for testing, won't remove duplicate backups
#Create a new backup if no previous backup exists
else:
print('Creating new backup...')
dataitem = gis.content.get(itemid) #fetch the item to be backed-up
backupname = f'{dataitem.title} Backup' #create a name for the backup using the existing item name
dataitem.export(backupname, itemtype, parameters=None, wait=True, tags=itemtags, snippet = itemdesc) #export the data to a file geodatabase within the user's content
## Move the backup to designated folder, if not root
searchquery = f"title:{backupname} AND owner:{username}" # search query using item title and owner
searchresult = gis.content.search(backupname, item_type=itemtype) #find the backup that was just created
backupitem = gis.content.get(searchresult[0].itemid) #get the itemid of that new item
if folderlocation != "/":
print('Moving backup to designated folder...')
backupitem.move(folder=folderlocation) #move the item to the correct user folder, if user chose somewhere other than the default root
... View more
05-12-2022
07:48 AM
|
2
|
2
|
3684
|
|
IDEA
|
Hello @Anonymous User, I saw that the ArcGIS API for Python 2.0.0 documentation has an argument for service_name included with to_featurelayer. This isn't available in previous versions of the API however, and ArcGIS Online Notebooks 6.0 is still using ArcGIS API for Python 1.9.1. Any idea when Notebooks 7.0 for ArcGIS Online is expected, and if it will use version 2.0.0?
... View more
05-04-2022
01:31 PM
|
0
|
0
|
4668
|
|
POST
|
I'm running into a similar issue but with the service_name parameter. Haven't figured it out yet. Following the documentation here: https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=to_featurelayer#arcgis.features.GeoAccessor.to_featurelayer sdf.spatial.to_featurelayer(title='My Feature Layer Title', tags=['my','tags'], service_name='My_Feature_Layer_Title') TypeError: to_featurelayer() got an unexpected keyword argument 'service_name' It works if I remove the service_name argument, but then the name of my service is a randomly generated string. Not sure how else to define it. Maybe because I'm using a Spatially Enabled Dataframe instead of the deprecated Spatial Dataframe?
... View more
04-14-2022
02:04 PM
|
1
|
0
|
1831
|
|
IDEA
|
Agreed, categories are a great step in the right direction but could definitely use some of these additional features, especially Anthony's second point, as well as being able to read/edit members categories via the ArcGIS API for Python: https://community.esri.com/t5/arcgis-online-ideas/add-new-member-categories-as-a-property-to-arcgis/idi-p/1156929
... View more
04-13-2022
09:13 AM
|
0
|
0
|
1803
|
|
IDEA
|
Adding additional endpoints/layers to a hosted feature service in ArcGIS Online would be very useful and help save time and cut down on clutter by combining data. Feature services often need to change as projects evolve.
... View more
04-13-2022
09:09 AM
|
0
|
0
|
1825
|
|
POST
|
Thank you both @fklotz and @JoëlHempenius3 , works great and saved me some work as well. I will add that I was getting an error when it hit certain web maps that contained uploaded shapefiles (Classic Map Viewer; and which have no url). To get around it I just wrapped Joëls whole bit into a try/except clause. I'm sure there's a more elegant way to handle that issue but this works and I can then investigate the map manually at that point if I suspect the layer I'm searching for is in there. try:
for lyr in lyrs:
if 'url' in lyr and not found_it:
found_it = lyr_to_find.lower() in lyr.url.lower()
elif 'layerType' in lyr and lyr.layerType =="GroupLayer":
for sublyr in lyr.layers:
if 'url' in sublyr and not found_it:
found_it = lyr_to_find.lower() in sublyr.url.lower()
except Exception as error:
print(f'{item.title} led to an error')
print(error)
display(item)
continue
... View more
03-31-2022
01:20 PM
|
2
|
0
|
10852
|
|
IDEA
|
@KaraUtterI have not, but would be very interested to know if anyone has as well
... View more
03-24-2022
01:13 PM
|
0
|
0
|
3014
|
|
IDEA
|
This would be nice for admins, maybe even give them a threshold limit that can be set. For example if the admin wanted to know any time a user uploads a hosted feature layer larger than 5GB. Could probably be done with the ArcGIS API for Python, but a built in solution would be great.
... View more
03-23-2022
11:52 AM
|
0
|
0
|
885
|
|
IDEA
|
The March 2022 update brought Member Categories to ArcGIS Online. It would be great if this property was accessible via the ArcGIS API for Python, in the user class of the gis module. We have a decent-sized organization with many decentralized divisions within when it comes to GIS, so updates like Member Categories are much appreciated. By exposing this info via the API, we can build Dashboards updated via Notebooks to help track our user base. Also would love to get to something like what was previously suggested in another Idea post, for tying custom role permissions to something like member categories.
... View more
03-23-2022
11:50 AM
|
21
|
12
|
3696
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | a month ago | |
| 1 | 09-17-2025 10:59 AM | |
| 1 | 09-17-2025 11:03 AM | |
| 3 | a month ago |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|