IDEA
|
Well it's sort of there - but there is no way I can see to add an expression so the Display field can be used to show more information like in the Info Summary widget - it only lets you select one field for the Display so that's not very helpful. If the Display field properties for the Analysis in the Near Me widget could be modified to include a custom expression then the functionality would be similar. The way it is right now is not ideal.
... View more
12-10-2024
06:30 AM
|
0
|
0
|
405
|
IDEA
|
Similar to the way the Info Summary widget in WAB displayed items, the List widget in ExB should have the ability to display items in the list by grouping them based on a field value, and also display the count of the grouped items.
... View more
11-20-2024
04:58 AM
|
0
|
2
|
498
|
BLOG
|
The Batch Edit widget is also high on our list - cannot move off WAB until that is available in ExB. The other item is the standard Edit widget in ExB does NOT have the same capabilities as the Smart Edit widget in WAB. Most importantly the ability to copy a feature/attributes to a new feature - this is another significant roadblock to moving to ExB from WAB.
... View more
10-31-2024
07:02 AM
|
2
|
0
|
4134
|
IDEA
|
Seems like sync enabled services (like data collected offline using Field Maps) are likely the ones that would benefit the most from using webhooks, so webhooks should absolutely be made available for sync enabled hosted feature services.
... View more
10-29-2024
09:48 AM
|
0
|
0
|
298
|
POST
|
For what it's worth, this just started becoming an issue for me too. I was able to copy the data from the user's device, and was able to see copies of each HEIC image in jpg in the survey attachments folder. However, the submission error persisted nevertheless.
... View more
07-08-2024
11:41 AM
|
0
|
1
|
1530
|
POST
|
Is there a way to manage field descriptions from Survey123 Connect? AFAIK one can manage just about every aspect of a field from Survey123 Connect, except for "Description".
... View more
06-20-2024
11:34 AM
|
0
|
1
|
623
|
POST
|
The Field Maps maps route might be the way to go, IMO. Rather than use the FM designer, you could configure the pop-up to open Survey123 from Field Maps. This way, you won't have to configure the survey to be read-only for certain users. Otherwise, Survey123 can be configured to display a URL that opens a survey from another survey. Basically, field worker opens the previously submitted office survey from the inbox. There are a lot of different ways to open as "read-only" (for example, you can check to see if a survey was opened from the inbox). This same logic can apply to the URL - only show the URL when the survey is opened in this read-only mode (for field worker use only). In both cases, you can pull data from the "read-only" office survey into the field worker survey. Hope this helps!
... View more
06-20-2024
11:22 AM
|
0
|
0
|
2109
|
POST
|
Has anyone resolved this issue or determined there is an open bug with ESRI ? It's February 2024 and it still persists - I'm unable to replace a vector tile layer from either the API using python or even directly from using the Replace Layer tool on the Details page of the vector tile layer on portal.
... View more
02-17-2024
03:24 AM
|
0
|
1
|
1708
|
POST
|
I fixed up this script so it can be run autonomously from a CI tool. The script will connect to a Pro Project and look for a map that contains the feature layers to be overwritten. All the feature layers contained in this map and their service definitions must have already been published initially and hosted on AGOL. The script disables sync and unregisters replicas before overwriting the service definition file and existing feature service. The feature layers in the map may be grouped or ungrouped. Grouped layers will be published as a single feature service, same as the ungrouped layers. All service properties (sync, sharing, editing etc.) will remain the same as they originally were. The layer names in the Pro map must match the published feature layer names, so make sure the map is setup correctly in Pro. Thanks to Jake Skinner for getting this started in the right direction. import arcpy, os, time
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
# Variables
prjPath = r"C:\PathToProProject\ProProject.aprx" # Path to Pro Project
map_name = 'Test Map Overwrite' # Name of map in Pro Project
portal = "https://www.arcgis.com" # AGOL
user = "username" # AGOL username
password = "password" # AGOL password
unregisterReplicas = True # True/False to unregister existing replicas
group_layer_names = []
ungrouped_layer_names = []
# Set Environment Variables
arcpy.env.overwriteOutput = 1
# Start Timer
startTime = time.time()
print(f"Connecting to AGOL")
gis = GIS(portal, user, password)
project = arcpy.mp.ArcGISProject(prjPath)
# Get the map in the project
map_obj = project.listMaps(map_name)[0]
# Iterate through all layers in the map and list the grouped layer names
for layer in map_obj.listLayers():
if layer.isGroupLayer:
group_layer_names.append(layer.name)
print (f"Grouped layer names: {group_layer_names}")
# Iterate through all layers in the map and list the ungrouped layer names
for layer in map_obj.listLayers():
if not layer.isGroupLayer:
# Check if the layer is part of any group layer
is_in_group = False
for parent_layer in map_obj.listLayers():
if parent_layer.isGroupLayer and layer in parent_layer.listLayers():
is_in_group = True
break
if not is_in_group:
ungrouped_layer_names.append(layer.name)
print (f"Ungrouped layer names: {ungrouped_layer_names}")
layer_list = ungrouped_layer_names + group_layer_names
print (f"Layers to be republished: {layer_list}")
# Loop through all the layers and get the feature layer and service definition ID's
for layer_name in layer_list:
# Filter the feature layers for an exact match and get the feature layer ID
fl_search_results = gis.content.search(query=f"title:{layer_name}", item_type="Feature Layer", sort_field='title', sort_order='asc')
fl_item = None
# Iterate through the search results to find the exact match
for item in fl_search_results:
if item.title == layer_name:
fl_item = item
break
if fl_item:
print(f"Found exact match for feature layer: {fl_item.title} (ID: {fl_item.id})")
else:
print(f"No exact match found for feature layer: {layer_name}")
# Filter the service definitions for an exact match and get the service definition ID
sd_search_results = gis.content.search(query=f"title:{layer_name}", item_type="Service Definition", sort_field='title', sort_order='asc')
sd_item = None
# Iterate through the search results to find the exact match
for item in sd_search_results:
if item.title == layer_name:
sd_item = item
break
if sd_item:
print(f"Found exact match for service definition: {sd_item.title} (ID: {sd_item.id})")
else:
print(f"No exact match found for service definition: {layer_name}")
# Local paths to create temporary content
sddraft = os.path.join(arcpy.env.scratchFolder, "WebUpdate.sddraft")
sd = os.path.join(arcpy.env.scratchFolder, "WebUpdate.sd")
sdItem = gis.content.get(sd_item.id)
#print (sdItem)
# Create a new SDDraft and stage to SD
print("Creating SD file")
arcpy.env.overwriteOutput = True
prj = arcpy.mp.ArcGISProject(prjPath)
mp = prj.listMaps(map_name)[0]
serviceDefName = sdItem.title
arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, serviceDefName, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS', '', True, True)
arcpy.StageService_server(sddraft, sd)
# Reference existing feature service to get properties
fsItem = gis.content.get(fl_item.id)
#print (fsItem)
flyrCollection = FeatureLayerCollection.fromitem(fsItem)
existingDef = flyrCollection.properties
# Unregister existing replicas
if unregisterReplicas:
if flyrCollection.properties.syncEnabled:
print("Unregister existing replicas")
for replica in flyrCollection.replicas.get_list():
replicaID = replica['replicaID']
flyrCollection.replicas.unregister(replicaID)
# Overwrite feature service
sdItem.update(data=sd)
print("Overwriting existing feature service")
fs = sdItem.publish(overwrite=True)
# Update service with previous properties
print("Updating service properties")
flyrCollection.manager.update_definition(existingDef)
print("Clearing scratch directory")
arcpy.env.workspace = arcpy.env.scratchFolder
for file in arcpy.ListFiles():
if file.split(".")[-1] in ('sd', 'sddraft', 'png', 'xml'):
arcpy.Delete_management(file)
endTime = time.time()
elapsedTime = round((endTime - startTime) / 60, 2)
print(f"Script completed in {elapsedTime} minutes")
... View more
02-06-2024
12:43 PM
|
0
|
1
|
2220
|
POST
|
A single service can have multiple layers, so this would not work in that scenario. True - but for the sake of reaping the benefits of using an automated publishing process like this, I'd make sure each layer in the map was published separately as a single service. This would be a special map only used for this purpose. The script will be run daily from a CI tool like Jenkins, so it needs to run completely autonomously on multiple layers.
... View more
02-02-2024
11:08 AM
|
1
|
0
|
2263
|
POST
|
HI Jake - thanks so much that script works great! Pretty much does what I want to do, but I do have some suggestions that I think would make it even better if possible! Ideally this script would loop through a list of all the layers the map and republish each one of them. The values for the variables named serviceDefID and featureServiceID could be derived automatically from the existing hosted services by matching up the layer names in the Pro map with existing published service names (assuming that the map layer names must match the published feature service names for this to work). Since the real value here is to automate publishing, editing the script each time to change those variables and run it one at a time for each layer is probably going to take more time than just overwriting them manually. Of course you could create multiple scripts with different variables for each layer then run them all, but that's not ideal either. In a perfect world, you would have a Pro project with map that included all the layers to be overwritten and the script would process each of those layers without any intervention. The other thing is I would only update the Sharing properties if the value of shrGroups is not null. If it is null, then just leave the existing sharing properties intact.
... View more
02-02-2024
08:16 AM
|
0
|
0
|
2273
|
POST
|
Would be great if someone could modify this script to include disable sync and unregister replicas before publishing takes place. I actually have attached a script that does this (attached) ... but not sure how/where to add it into the existing code example for automated publishing. from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
from arcgis.features import FeatureLayer
import requests
# Connect to your ArcGIS Online organization
gis = GIS("https://www.arcgis.com","username","password")
token = gis._con.token
#Hosted feature layer names to disable sync and unregister all replicas
search_queries = ["Test Layer1", "Test Layer2"]
# Create an empty list to store the item IDs
item_ids = []
# Loop through each search query and get the corresponding feature services
for search_query in search_queries:
search_results = gis.content.search(query=search_query, item_type="Feature Service")
#print (search_results)
# Loop through each search result and append the item ID to the list
for search_result in search_results:
item_ids.append(search_result.id)
#print(item_ids)
# Loop through each item ID and unregister all replicas then disable sync
for item in item_ids:
flc = FeatureLayerCollection.fromitem(gis.content.get(item))
url = flc.url + "/unRegisterReplica?&replicaID=*&f=json&token="+token
#print (url)
response = requests.post(url)
flc.manager.update_definition({"syncEnabled": False})
message = "Successfully unregistered all replicas and disabled sync on: " + ", ".join(search_queries)
print(message)
... View more
02-01-2024
10:00 AM
|
0
|
2
|
2288
|
POST
|
Why is Survey123 looking for a layer that shares a name with my instance_id?
... View more
10-10-2023
02:56 PM
|
0
|
1
|
464
|
IDEA
|
Categories are extremely helpful for organizing content on Portal (and AGOL). The problem is that since there is no way to make them required, more often than not they are left empty so the benefit of using categories to organize Portal content is not practical without constant/daily review and management by portal administrators. While training users and requesting that each new item should include a relevant category value, if that's not enforceable then it's not going to work - especially in a large organizations with many users creating content. The best solution would be to include a setting in Portal that would require a value in Categories if this setting was turned on. That way Portal Administrators could decide whether or not they wanted to make assigning Categories required or not.
... View more
06-20-2023
06:36 AM
|
6
|
1
|
745
|
BLOG
|
I get the blank screen too when trying to login (from Portal), and yes the Registered App is setup and the Re-direct URI added. That's not the problem. It's trying to load a localized language file that doesn't exist. in this line of code: https://assistant.esri-ps.com/locales/en-US/strings.json
... View more
01-04-2023
10:29 AM
|
3
|
0
|
9781
|
Title | Kudos | Posted |
---|---|---|
2 | 10-31-2024 07:02 AM | |
1 | 02-02-2024 11:08 AM | |
6 | 06-20-2023 06:36 AM | |
3 | 01-04-2023 10:29 AM | |
10 | 12-19-2022 04:45 AM |
Online Status |
Offline
|
Date Last Visited |
4 weeks ago
|