|
POST
|
hey perhaps your issue is related to this BUG Reference number:- BUG-000144024 Public Status:- New Synopsis:- The arcade expression to count the number of attachments fails to honor in the ArcGIS Field Maps. I have a similar issue with an Arcade expression, working just fine in a web map but NOT in any of the mobile apps on IOS (Field Maps, Collector, etc.)
... View more
11-15-2021
12:54 PM
|
0
|
0
|
1053
|
|
POST
|
Hello take a look at this older post, that should solve your problem https://community.esri.com/t5/arcgis-api-for-python-questions/setting-the-refresh-interval-for-a-hosted-feature/td-p/845181
... View more
11-15-2021
08:45 AM
|
0
|
3
|
1969
|
|
POST
|
Hey Jay you should look at creating a new Data Expression on the Serial Chart settings. You could then create a featureset on the fly , splitting your MONTH/DAY field(s) and get the results you are looking for. (the sample link could give you some good ideas as well) Hope that can help you. Good luck! // Write an expression that returns a FeatureSet.
// Documentation: https://arcg.is/3c419TD
// Samples: https://arcg.is/38SEWWz
var fs = FeatureSetByPortalItem(Portal('https://arcgis.com/'), 'YOURITEMID', 0, ["CallDateTime","callYear"], false);
var drFilter = "callYear in (2020,2021) and Agency in('AFD')"
var drSel = Filter(fs,drFilter)
//return count(drSel)
var combinedDict = {
fields: [
{ name: "CallDateTime", type: "esriFieldTypeString" },
{ name: "callYear", type: "esriFieldTypeString" },
{ name: "callDay", type: "esriFieldTypeString" },
{ name: "callMonth", type: "esriFieldTypeString" },
{ name: "callMonthDay", type: "esriFieldTypeString" },
],
geometryType: "",
features: [],
};
var i = 0;
for (var d in drSel){
combinedDict.features[i] = {
attributes: {
CallDateTime: d["CallDateTime"],
callYear: d["callYear"],
callDay: Day(d["CallDateTime"]),
callMonth: ISOMonth(d["CallDateTime"]),
callMonthDay: ISOMonth(d["CallDateTime"])+'-'+Day(d["CallDateTime"])
},
};
i++;
//return d["CallDateTime"] + " " + ISOMonth(d["CallDateTime"]) + " "+ Day(d["CallDateTime"])
}
//return combinedDict;
return FeatureSet(Text(combinedDict));
... View more
11-10-2021
10:20 AM
|
0
|
1
|
2844
|
|
POST
|
Hey Mag You have to add the the other fields that you want to use to your Function definition. Your def should be more like this def calcul(Euval, GdVal,SmVal) ...rest of your code and to use the function you could use calcul(!Eu_Eu!,!Gd!,!Sm!) Bonne chance!
... View more
11-08-2021
02:38 PM
|
3
|
0
|
1666
|
|
POST
|
hummm I am not sure. it's working for me (see image below). Can you try to add a new dynamic txt for the count just for fun.
... View more
11-08-2021
07:00 AM
|
1
|
1
|
8964
|
|
POST
|
Hi Linda would this works for you? import arcpy
docPath = r"D:\FOLDER"
docName = r"AGSPRODOC.aprx"
p = arcpy.mp.ArcGISProject(docPath+"\\"+docName)
# ge a list of all layouts in your map dox
lLayout = p.listLayouts()
for l in lLayout:
print(l.name)
#You could add an if statement to print ONLY a specific layout
l.exportToJPEG(docPath+"\\"+l.name+"jpg")
print("Process Completed")
... View more
11-05-2021
08:51 AM
|
1
|
3
|
9035
|
|
POST
|
we could replace the first updateCursor with SearchCursor, it's still working for me fields = ['OBJECTID','GROUPT', 'LABELT','SHAPE@X','SHAPE@Y']
where = f"""GROUPT IS NOT NULL AND TRIM(BOTH ' ' FROM GROUPT) <> ''"""
print(where)
sql_clause = (None, 'ORDER BY GROUPT DESC')
i=0
with arcpy.da.SearchCursor(fc, fields, where, sql_clause=sql_clause) as ucurs:
ucursSort = sorted(ucurs,key=lambda group : group[4], reverse=True)
for group in ucursSort:
print(group)
current_group = group
try:
if current_group != previous_group:
letter_index = 0
except NameError:
letter_index = 0
new_lbl = ascii_uppercase[letter_index]
print(new_lbl)
#ucursSort.updateRow(group)
where2 = f"""OBJECTID = """+str(group[0])
print(where2)
with arcpy.da.UpdateCursor(fc, fields, where2) as ucursU:
for r in ucursU:
print(r)
r[2] = new_lbl
ucursU.updateRow(r)
letter_index += 1
previous_group = current_group
print("------------------")
... View more
11-04-2021
08:09 AM
|
1
|
1
|
4389
|
|
POST
|
I did tested it on a point feature class in a file geodatabase and it worked for me
... View more
11-04-2021
08:00 AM
|
1
|
3
|
4391
|
|
POST
|
how about this: Adding the UpdateCursor based on the OBJECTID of your first sorted() fields = ['OBJECTID','GROUPT', 'LABELT','SHAPE@X','SHAPE@Y']
where = f"""GROUPT IS NOT NULL AND TRIM(BOTH ' ' FROM GROUPT) <> ''"""
print(where)
sql_clause = (None, 'ORDER BY GROUPT DESC')
i=0
with arcpy.da.UpdateCursor(fc, fields, where, sql_clause=sql_clause) as ucurs:
ucursSort = sorted(ucurs,key=lambda group : group[4], reverse=True)
for group in ucursSort:
print(group)
current_group = group
try:
if current_group != previous_group:
letter_index = 0
except NameError:
letter_index = 0
new_lbl = ascii_uppercase[letter_index]
print(new_lbl)
#ucursSort.updateRow(group)
where2 = f"""OBJECTID = """+str(group[0])
print(where2)
with arcpy.da.UpdateCursor(fc, fields, where2) as ucursU:
for r in ucursU:
print(r)
r[2] = new_lbl
ucursU.updateRow(r)
letter_index += 1
previous_group = current_group
print("------------------")
... View more
11-04-2021
07:43 AM
|
1
|
6
|
4393
|
|
POST
|
Hi Vince would this work for you. I tested it and seems like the sorted() reverse=true on the SHAPE@Y field will sort from North to South fields = ['OBJECTID','GROUPT', 'LABELT','SHAPE@X','SHAPE@Y']
where = f"""GROUPT IS NOT NULL AND TRIM(BOTH ' ' FROM GROUPT) <> ''"""
sql_clause = (None, 'ORDER BY GROUPT DESC')
with arcpy.da.UpdateCursor(fc, fields, where, sql_clause=sql_clause) as ucurs:
ucursSort = sorted(ucurs,key=lambda group : group[4], reverse=True)
for group in ucursSort:
print(group)
current_group = group
try:
if current_group != previous_group:
letter_index = 0
except NameError:
letter_index = 0
new_lbl = ascii_uppercase[letter_index]
#ucurs.updateRow([group, new_lbl])
letter_index += 1
previous_group = current_group
... View more
11-04-2021
07:05 AM
|
0
|
9
|
4397
|
|
POST
|
Hey I am curious, what version of ArcGIS Server are you running? I have a similar issue on one of our server running 10.6.1. Thanks!
... View more
11-03-2021
06:26 AM
|
0
|
1
|
2842
|
|
POST
|
Hi AspenN is your feature layer hosted on an ArcGIS Server or ArcGIS Online? if it's on an ArcGIS Server you could enable WFS from the Server Manager
... View more
11-02-2021
07:57 AM
|
0
|
1
|
2287
|
|
POST
|
Hello, for me all me SDE connections are in the same folder (workspace) so if you define the workspace, you should get your listing of SDE databases. Worked for me. 🙂 (in Catalog, right click the SDE connection, select properties and look at the path of the "name") import arcpy
arcpy.env.workspace = r"C:\Users\USERNAME\AppData\Roaming\ESRI\Desktop10.8\ArcCatalog"
# List all file geodatabases in the current workspace
workspaces = arcpy.ListWorkspaces("*", "SDE")
for workspace in workspaces:
print workspace
... View more
10-29-2021
12:23 PM
|
0
|
0
|
4520
|
|
POST
|
those little things 🙂 FYI, if you try to use that expression in Fields Maps... it won't work..I have been working with ESRI Tech Support on that and this morning they logged it as a bug (I was using almost the same code to bring attachments in the popup) Reference number:- BUG-000144024 Public Status:- New Synopsis:- The arcade expression to count the number of attachments fails to honor in the ArcGIS Field Maps.
... View more
10-27-2021
09:25 AM
|
2
|
0
|
3111
|
|
POST
|
code looks good, are you sure your "expression" is listed in your list of pop-ups fields?
... View more
10-26-2021
02:01 PM
|
0
|
2
|
3138
|
| 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 |
2 weeks ago
|