|
POST
|
After making a selection, you can use the CalculateField Python command (or geoprocessing tool) to edit the fields of only the selected records. However, make sure your input for it is the layer with the selection and not a generic path to the feature class in the geodatabase. In the latter case, it won't have a selection and it will field calc all records. You can also run the tool with an undo option in case there is unexpected behavior.
... View more
06-05-2024
08:18 AM
|
2
|
0
|
1833
|
|
POST
|
If you check the documentation for Split(), you'll see the last parameter is removeEmpty. There's something in the logic of how Split() works that can create empty items in the array and setting removeEmpty to true will resolve that.
... View more
05-31-2024
01:40 PM
|
0
|
0
|
2492
|
|
POST
|
Since you're making html, you could leverage that and use an unordered list that will automatically apply formatting. var sMgmt = split($feature.ManagementGoals, "•", 10, true)
// Format text strings with html list item tags.
for(var i in sMgmt) {
sMgmt[i] = "<li>" + Trim(sMgmt[i]) + "</li>"
}
// Combine all the list items within html unordered list.
var v = "<ul>" + Concatenate(sMgmt) + "</ul>"
... View more
05-31-2024
12:15 PM
|
0
|
0
|
2539
|
|
POST
|
Could you make another GraphicsLayer for display? When a graphic in the "base" layer is clicked, you add it to the "display" layer (above the base). Then remove it from the "display" layer when something else is clicked.
... View more
05-31-2024
06:58 AM
|
0
|
0
|
745
|
|
POST
|
You might need to use Convert() in the SQL expression to explicitly specify the value is a date and not a string. I also reorganized a little bit for readability. # Fetch data from both tables
workorders_data = []
and_expressions = [
f"Type = '{type_query}'",
f"teamLeader = '{leader_query}'",
f"teamAssigned = '{assigned_query}'",
f"dateReceived <= Convert(datetime, '{date_before}')",
f"dateReceived >= Convert(datetime, '{date_after}')"
]
expression = " AND ".join(and_expressions)
with arcpy.da.SearchCursor(f'{gdb_path}\\{workorders_fc}', workorders_fields, where_clause=expression) as cursor:
for row in cursor:
workorders_data.append(row)
... View more
05-28-2024
02:17 PM
|
0
|
0
|
3851
|
|
POST
|
I use ArcSDESQLExecute for querying non-spatial databases too. Your mileage may vary as the SQL gets more complex.
... View more
05-28-2024
01:55 PM
|
0
|
0
|
1727
|
|
POST
|
I've been able to use ArcSDESQLExecute as a replacement for basic things.
... View more
05-28-2024
01:02 PM
|
1
|
2
|
1736
|
|
POST
|
I have had this happen when clicking links in the automatic subscription emails, but it's rare; maybe 10% of the time.
... View more
05-22-2024
11:13 AM
|
1
|
0
|
3394
|
|
POST
|
You could create a script tool or Python toolbox that runs inside ArcGIS Pro. Both give you a simple user interface and custom messaging.
... View more
05-22-2024
09:00 AM
|
1
|
2
|
4329
|
|
POST
|
Esri has some documentation called the ArcGIS Well-Architected Framework that might be useful to get started with.
... View more
05-21-2024
01:58 PM
|
0
|
0
|
2227
|
|
POST
|
You can use Python to open a search cursor using the fields in the order you want with a sql_clause parameter to sort on the field you want. Iterate through each row of the cursor and write the data to your text file. You can even use the Python CSV module.
... View more
05-20-2024
11:45 AM
|
1
|
0
|
3261
|
|
POST
|
I think your fieldMap is incorrect. The error: "Every table requires a role" refers to the role that is also configured within the field_mapping. If you run the tool manually in ArcGIS Pro, then go to the geoprocessing history tab in the Catalog pane, you can right click on the tool result and copy as Python command. Then paste that into your code editor so you can see the formatting of everything. That's what I did here and this was what I got. fieldMap = [
"StreetAddress.HOUSE_NUMBER_FROM_LEFT 'road_layer'.L_LADD",
"StreetAddress.HOUSE_NUMBER_TO_LEFT 'road_layer'.L_HADD",
"StreetAddress.HOUSE_NUMBER_FROM_RIGHT 'road_layer'.R_LADD",
"StreetAddress.HOUSE_NUMBER_TO_RIGHT 'road_layer'.R_HADD",
"StreetAddress.HOUSE_NUMBER_FROM_RIGHT 'road_layer'.R_LADD",
"StreetAddress.PARITY_LEFT 'road_layer'.L_PARITY",
"StreetAddress.PARITY_RIGHT 'road_layer'.R_PARITY",
"StreetAddress.STREET_NAME 'road_layer'.NAME",
"StreetAddress.STREET_SUFFIX_TYPE 'road_layer'.SFX",
"StreetAddress.STREET_SUFFIX_DIR 'road_layer'.DIR",
"StreetAddress.FULL_STREET_NAME 'road_layer'.FULL_NAME"
]
... View more
05-20-2024
07:48 AM
|
1
|
0
|
2189
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2025 03:53 PM | |
| 1 | 2 weeks ago | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM | |
| 1 | 12-01-2025 06:19 AM |