|
POST
|
I solved my problem looking at this post: You have to select FEATURES and not Grouped values https://community.esri.com/t5/arcgis-dashboards-questions/selector-spatial-filter-by-polygon-geometry-not/td-p/1204846
... View more
04-06-2026
11:01 AM
|
0
|
0
|
674
|
|
POST
|
I got the "spatial Filter", however, some feature outside my selected polygon are selected.... is the spatial filter based on the "extent' of the selected polygon and the "within" the polygon?
... View more
03-27-2026
06:29 AM
|
0
|
1
|
823
|
|
POST
|
Hello Dashboarders, I have a List widget with search function enabled... What I would like to do is to have an Arcade expression that returns a "No Selection" message when the use keep typing but the List is Empty. Is that doable?
... View more
03-26-2026
01:47 PM
|
1
|
0
|
183
|
|
POST
|
Hello, for what it's worth, I had the same issue (Notebook in AGS Pro), I open a Support ticket and below is how I solved MY issue: - I was trying to loop through an item list (3400 records), I was having a bunch of "print" statement an I was trying to write into a CSV... Solution: - Stop all printing statements - use logging instead of writing to the csv file I was able to complete my process. import time
import logging
icount = 0
tcount = 0
strFileNameESRI = drNotebookFolder + "\\" + "brokenLinks_ESRIV2_01262026.txt"
logging.basicConfig(filename=strFileNameESRI,level=logging.INFO, format='%(message)s',filemode='w')
for n in no_item_nodes:
#print("*******************")
logging.info("*******************")
#print("Broken Item: " + (str(n.id)))
logging.info("Broken Item: " + (str(n.id)))
#print(" ")
broken_node = n
#print(broken_node)
#print("Contained By")
logging.info("Contained By: ")
#print(broken_node.contained_by())
logging.info(str(broken_node.contained_by()))
# print("-----------------------")
#print("required By")
#txtoutputM.write("required By: "+"\n")
logging.info("required By: ")
#print(broken_node.required_by())
logging.info(str(broken_node.required_by()))
#print(" ")
icount +=1
logging.info(str(icount))
# tcount +=1
# print(tcount)
print("Process all done") below is the summary from my Support case from the analyst Good luck!
... View more
02-10-2026
08:41 AM
|
0
|
0
|
322
|
|
POST
|
@StevenBeothy thank you for the quick response we are at 2025.0, our notifications are setup based on Collections, so I don't have the "Metrics" option available. Is the Metrics option only available to Custom Notification? I did create a dummy Custom notification, I was able to add the Metrics option, but I don't get the service name in the name attribute like you do.... What am I missing?
... View more
01-29-2026
09:55 AM
|
0
|
0
|
509
|
|
POST
|
@MarlonAmaya Yes I had the documentation and below are the fields that are listed in the Alerts attributes and a bunch are missing
... View more
01-29-2026
06:05 AM
|
0
|
2
|
529
|
|
POST
|
Hello, we have enabled the webhook on a few notifications (Alerts) setup based on Collection. We are able to get the payload, but how do we get the name of the service that is causing the notification to be triggered? Below is a copy of the payload we are receiving according to the documentation (ArcGIS Monitor Information Model—ArcGIS Monitor | Documentation) should the payload has more attributes? (component_name,component_type, etc..). We would be really interested in getting the name of the map service that is triggering the alert. Any information you could provide would be much appreciated. Thanks! Dominic
... View more
01-28-2026
11:27 AM
|
0
|
5
|
573
|
|
POST
|
Thanks @TonyAlmeida but that didn't solved my issue. I also tried to create a function just for the query definition that didn't help either. So I ended up splitting the code into 2 scripts: Step 1 create the query definition, Step2 update the layouts and PDF. Using a Mode Builder I can run both scripts at the same time and no issue. I would love to get the code to run into 1 script but whatever works for now. Thanks! below was my revised code with the definition query function: import arcpy
import os
import sys
from arcgis import GIS
from datetime import datetime
# Get today's date
today = datetime.today()
formatted_date = today.strftime("%m%d%Y")
#********************************************************************************************
def GRDefinitionQuery(MapName,LayerName,FieldNumber,LayoutName):
newDefinitionQueryString = "SAG_FieldNumber = "+FieldNumber
arcpy.AddMessage(newDefinitionQueryString)
m= aprx.listMaps(MapName)[0]
arcpy.AddMessage(MapName)
for lyr in m.listLayers():
arcpy.AddMessage(lyr.name)
if lyr.name ==LayerName:
arcpy.AddMessage("We found our layer to update")
if lyr.supports('DefinitionQuery'):
arcpy.AddMessage("here we go")
# Updade Definition query
dql = lyr.listDefinitionQueries()
arcpy.AddMessage("original dql" + str(dql))
for dq in dql:
arcpy.AddMessage("in dq")
dq['sql'] = newDefinitionQueryString
lyr.updateDefinitionQueries(dql)
arcpy.AddMessage("revised dql" + str(dql))
count_result = arcpy.management.GetCount(lyr)
record_count = int(count_result[0])
arcpy.AddMessage("number of records: " + str(record_count))
break
aprx.save()
time.sleep(5) # Small delay
def GRMapExtent(MapName,LayerName,FieldNumber,FieldName, LayoutName):
map_name = MapName
arcpy.AddMessage(" " +map_name)
layer_name = LayerName
map_frame_name = 'Map Frame'
# Access the map
map_obj = aprx.listMaps(map_name)[0]
# Clear any existing selection
for lyr in map_obj.listLayers():
if lyr.isFeatureLayer:
lyr.setSelectionSet(None)
# Get the layer
layer = map_obj.listLayers(layer_name)[0]
# Use arcpy.Describe to get extent
desc = arcpy.Describe(layer)
layer_extent = desc.extent
count_result = arcpy.management.GetCount(layer)
record_count = int(count_result[0])
arcpy.AddMessage(" number of records: " + str(record_count))
# Access the layout and map frame
layout = aprx.listLayouts(LayoutName)[0] # or specify layout by name: aprx.listLayouts("LayoutName")[0]
map_frame = layout.listElements("mapframe_element", map_frame_name)[0]
cursor = arcpy.da.SearchCursor(layer, ['SHAPE@',FieldNumber,FieldName])
arcpy.AddMessage("*****************")
for c in cursor:
arcpy.AddMessage(u' {0},{1}'.format(c[1],c[2]))
strName = c[2]
arcpy.AddMessage(" Final Name: " + str(strName))
extent = c[0].extent
paddingFirst = extent.XMax-extent.XMin
padding = (float(paddingFirst)/float(20))
new_extent=arcpy.Extent(extent.XMin-padding,extent.YMin-padding,extent.XMax+padding,extent.YMax+padding,None,None,None,None,extent.spatialReference)
# Set the map frame extent to the layer extent
map_frame.camera.setExtent(new_extent)
arcpy.AddMessage(" " +"Mainframe extent done")
GRLayoutTitle(SAGFieldNunber + " : "+strName+ " "+ l)
arcpy.AddMessage(" " +"Title update")
GRExportLayouttoPDF(template_name,strName,formatted_date)
arcpy.AddMessage(" " +"Export to PDF done")
#sys.exit(0)
def GRLayoutTitle(TitleName):
elm_name = "SAG Title" # the name you assign to the title (TEXT) element
p = arcpy.mp.ArcGISProject("CURRENT")
for lyt in p.listLayouts(): # get the element
for elm in lyt.listElements("TEXT_ELEMENT"):
if elm.name == elm_name:
elm.text = TitleName
def GRExportLayouttoPDF(layoutName,FieldName, strDate):
layout_name = layoutName # Name of the layout in your project
output_folder= r"C:\temp"
output_name = layoutName+"_"+FieldName+"_"+strDate+".pdf"
layout = aprx.listLayouts(layout_name)[0]
layout.exportToPDF(output_folder+"\\"+output_name, resolution=150) #,jpeg_compression_quality=80, output_as_image=True,compress_vector_graphics=True
#********************************************************************************************
arcpy.AddMessage("Let's update the Definition queries")
aprx = arcpy.mp.ArcGISProject("CURRENT")
LyrName = arcpy.GetParameterAsText(0)
FieldName = arcpy.GetParameterAsText(1)
name_field = 'SAG_FieldNumber' #'SAG_SiteName'
SAGFieldNunber = arcpy.GetParameterAsText(2)
SAGFieldName = 'SAG_FieldName'
listMaps = ['2021 Ortho','2023 Ortho','LIDAR']
for l in listMaps:
arcpy.AddMessage(l + "-------------------------------------------")
NewMapName = "SAG_Manure_Map_"+l
template_name = "SAG_Manure_Layout_"+l
arcpy.AddMessage("Now let's change the Query Definituon")
GRDefinitionQuery(NewMapName,LyrName, SAGFieldNunber,template_name)
arcpy.AddMessage("Now let's change the extent of the map")
GRMapExtent(NewMapName, LyrName,name_field,SAGFieldName,template_name)
arcpy.AddMessage("------------------------")
arcpy.AddMessage("Definition query updated")
... View more
07-14-2025
08:23 PM
|
0
|
0
|
757
|
|
POST
|
Hello, I created a script that loop through 3 maps, update a definition query based on a parameter then change the extent of the layout and export the layout to PDF. It's "kind of working" however, every time I run the process ONE map (never the same) get stuck on the extent of the previous selection. Below is the code and the details info the process. Weird thing is if I look in all 3 maps, the query definition has been updated... import arcpy
import os
import sys
from arcgis import GIS
from datetime import datetime
# Get today's date
today = datetime.today()
formatted_date = today.strftime("%m%d%Y")
#********************************************************************************************
def GRMapExtent(MapName,LayerName,FieldNumber,FieldName, LayoutName):
map_name = MapName
arcpy.AddMessage(" " +map_name)
layer_name = LayerName
map_frame_name = 'Map Frame'
# Access the map
map_obj = aprx.listMaps(map_name)[0]
# Get the layer
layer = map_obj.listLayers(layer_name)[0]
# Use arcpy.Describe to get extent
desc = arcpy.Describe(layer)
layer_extent = desc.extent
count_result = arcpy.management.GetCount(layer)
record_count = int(count_result[0])
arcpy.AddMessage(" number of records: " + str(record_count))
# Access the layout and map frame
layout = aprx.listLayouts(LayoutName)[0] # or specify layout by name: aprx.listLayouts("LayoutName")[0]
map_frame = layout.listElements("mapframe_element", map_frame_name)[0]
cursor = arcpy.da.SearchCursor(layer, ['SHAPE@',FieldNumber,FieldName])
arcpy.AddMessage("*****************")
for c in cursor:
arcpy.AddMessage(u' {0},{1}'.format(c[1],c[2]))
strName = c[2]
arcpy.AddMessage(" Final Name: " + str(strName))
extent = c[0].extent
paddingFirst = extent.XMax-extent.XMin
padding = (float(paddingFirst)/float(20))
new_extent=arcpy.Extent(extent.XMin-padding,extent.YMin-padding,extent.XMax+padding,extent.YMax+padding,None,None,None,None,extent.spatialReference)
# Set the map frame extent to the layer extent
map_frame.camera.setExtent(new_extent)
arcpy.AddMessage(" " +"Mainframe extent done")
GRLayoutTitle(SAGFieldNunber + " : "+strName+ " "+ l)
arcpy.AddMessage(" " +"Title update")
GRExportLayouttoPDF(template_name,strName,formatted_date)
arcpy.AddMessage(" " +"Export to PDF done")
#sys.exit(0)
def GRLayoutTitle(TitleName):
elm_name = "SAG Title" # the name you assign to the title (TEXT) element
p = arcpy.mp.ArcGISProject("CURRENT")
for lyt in p.listLayouts(): # get the element
for elm in lyt.listElements("TEXT_ELEMENT"):
if elm.name == elm_name:
elm.text = TitleName
def GRExportLayouttoPDF(layoutName,FieldName, strDate):
layout_name = layoutName # Name of the layout in your project
output_folder= r"C:\GIS\OUTPUT_PDF"
output_name = layoutName+"_"+FieldName+"_"+strDate+".pdf"
layout = aprx.listLayouts(layout_name)[0]
layout.exportToPDF(output_folder+"\\"+output_name, resolution=200)
#********************************************************************************************
arcpy.AddMessage("Let's update the Definition queries")
aprx = arcpy.mp.ArcGISProject("CURRENT")
LyrName = arcpy.GetParameterAsText(0)
FieldName = arcpy.GetParameterAsText(1)
name_field = 'SAG_FieldNumber' #'SAG_SiteName'
SAGFieldNunber = arcpy.GetParameterAsText(2)
SAGFieldName = 'SAG_FieldName'
listMaps = ['2021 Ortho','2023 Ortho','LIDAR']
for l in listMaps:
arcpy.AddMessage(l + "-------------------------------------------")
NewMapName = "SAG_Manure_Map_"+l
template_name = "SAG_Manure_Layout_"+l
newDefinitionQueryString = "SAG_FieldNumber = "+SAGFieldNunber
arcpy.AddMessage(newDefinitionQueryString)
m= aprx.listMaps(NewMapName)[0]
arcpy.AddMessage(NewMapName)
for lyr in m.listLayers():
arcpy.AddMessage(lyr.name)
if lyr.name ==LyrName:
arcpy.AddMessage("We found our layer to update")
if lyr.supports('DefinitionQuery'):
arcpy.AddMessage("here we go")
# Updade Definition query
dql = lyr.listDefinitionQueries()
arcpy.AddMessage("original dql" + str(dql))
for dq in dql:
arcpy.AddMessage("in dq")
dq['sql'] = newDefinitionQueryString
lyr.updateDefinitionQueries(dql)
arcpy.AddMessage("revised dql" + str(dql))
count_result = arcpy.management.GetCount(lyr)
record_count = int(count_result[0])
arcpy.AddMessage("number of records: " + str(record_count))
arcpy.AddMessage("Now let's change the extent of the map")
GRMapExtent(NewMapName, LyrName,name_field,SAGFieldName,template_name)
arcpy.AddMessage("------------------------")
arcpy.AddMessage("Definition query updated") This is the details from the proces I looked at this for too long:( Any help would be much appreciated
... View more
07-13-2025
04:58 PM
|
1
|
3
|
827
|
|
POST
|
Hello, I ma trying to automate the process of creating/updating AGOL items metadata using Survey123, FME, etc... I would like to know where can I get the list of values for all the dropdown list used in the AGOL Metadata editor (see example below) without having to test them all individually 😁 Value in XML file: Any help would be much apprecited. Thanks! Dominic
... View more
06-11-2025
08:07 AM
|
1
|
1
|
554
|
|
POST
|
@Neal_t_k and @ChristopherCounsell Thank you both for all the inputs. As I mentioned before, I am trying to minimize the number of fields in the feature class. So I tested adding a true field for the dropdown list.... everything is working fine EXCEPT if I select the Other option. ex: Original WEI_BMS field has value of JSON, I update the data using the dropdown field (WEI_DBMS_List) to Shapefile and Submit.... both fields have the Shapefile value If original WEI_BMS field has value of Shapefile, I update the data using the dropdown field (WEI_DBMS_List) to Other ... then I get the option to add a new value: let's say I add KMZ and Submit.... WEI_BMS field will have KMZ and the new WEI_DBMS_List field will have Other has a value. I added a pulldata formula in the Calculate and if I click Recalculate I will get the JSON there. I don't want users to have to click to refresh the data. So how could I pass the WEI_DBMS value to the dropdown list if the value is Other? I tried coalesce and if statement and both of them create an error with the parsing.
... View more
05-29-2025
11:23 AM
|
0
|
1
|
1263
|
|
POST
|
it just make the survey too cluttered.. my users will get confused with this interface. I would probably need 2 surveys: One for initial data entry and one for data editing.
... View more
05-28-2025
11:53 AM
|
0
|
1
|
2459
|
|
POST
|
@Neal_t_k , I don't think this is going to work as the calculation over write the existing value with the coalesce formula. I am probably going to need an IF statement there instead...
... View more
05-28-2025
09:31 AM
|
0
|
3
|
2490
|
|
POST
|
Hi @ChristopherCounsell Yes, I have 2 "dummy" fields as NULL used as place holder (one for the dropdown list and one for the "Other" option). I do not want to created true fields has I want to use this process for the entire survey and I have about 10 questions with dropdown list. The current process work GREAT if I create a new entry from scratch. How could I make use of the search functionality to populate a dropdown using live data from the map service, with an Other option in case of a new value for that dropdown and retain the existing value.... all that without having to create 2 extra fields in the layer. Thanks!
... View more
05-28-2025
08:03 AM
|
0
|
11
|
2501
|
|
POST
|
Hello, I am following the steps from this post Open List and it's working fine to ge my unique list of values in the dropdown list https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-open-lists/ba-p/1180879 However, when I Edit the survey, I "loose" the original value that was entered. How can I retain the original value when I am in edit mode? - I've tried Calculated field , not working Attached the section of the spreadsheet showing above. The process is working fine with CSVs... I just would like to be able to use the "live" data from the map service as users start to add more options for each dropdowns. Any help or suggestions would be much appreciated. Thanks!
... View more
05-27-2025
02:49 PM
|
0
|
16
|
3910
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-26-2026 01:47 PM | |
| 1 | 08-05-2024 06:19 AM | |
| 1 | 06-11-2025 08:07 AM | |
| 1 | 07-13-2025 04:58 PM | |
| 1 | 02-27-2025 08:13 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|