|
POST
|
Are you creating it from a shapefile or a geodatabase feature class?
... View more
05-19-2023
11:08 AM
|
0
|
6
|
3202
|
|
POST
|
When you create the shapefile, you'll have to do it row by row, no export or update. Do you need a shapefile (with geometry) or can it be just a table of values (CSV)?
... View more
05-19-2023
10:19 AM
|
0
|
8
|
3209
|
|
POST
|
@2Quiker wrote: Blake, this is helpful but it doesn't physically change the order of the SUB_NAME field. I can't think of a practical reason why you would need to reorder the records in the table. Every method for viewing the data allows for sorting it as needed. If you wanted to change the order of the records in the table (beyond an ad hoc sort), you need to recreate the table. May I ask what your requirement is that you need to reorder the rows in the table? @2Quiker wrote: Would it best to place this shapefile in to a file geodatabase? Yes. When working with Esri products, I highly recommend using a file geodatabase over a shapefile. You can always export it back to a shapefile later if you need to share it that way.
... View more
05-17-2023
12:46 PM
|
0
|
10
|
3227
|
|
POST
|
You should read the documentation. DISTINCT, ORDER BY, and ALL are only supported when working with databases. They are not supported by other data sources (such as dBASE or INFO tables). TOP is only supported bySQL Serverdatabases. For a shapefile, you will need to read all the data into a list, and then enumerate the sorted list. Here's an untested code sample. import arcpy
subs_shp = 'C:\Temp\SUBS.shp'
sub_name_values = [row[0] for row in arcpy.da.SearchCursor(subs_shp,["SUB_NAME"])]
sub_name_id = {}
for enum, sub_name in enumerate(sorted(sub_name_values)):
sub_name_id[sub_name] = enum
with arcpy.da.UpdateCursor(subs_shp,["ID","SUB_NAME"]) as u_cursor:
for id, sub_name in u_cursor:
id = sub_name_id[sub_name]
u_cursor.updateRow([id, sub_name])
... View more
05-16-2023
03:42 PM
|
0
|
12
|
3263
|
|
POST
|
Keep in mind you'll need to use the versioned view if you're editing versioned data with SQL. It's more complicated if you're working in a named version rather than the Default version. Edit versioned data in SQL Server using SQL—ArcMap | Documentation (arcgis.com)
... View more
05-12-2023
07:19 AM
|
1
|
0
|
1699
|
|
POST
|
Ha! That's a very unfortunate situation. Can you insert the row if you don't use the Order field? If so, do that, then update the row later with your Order value. Not efficient, but that is the first thing that comes to mind. Or if this feature class has little or no dependencies, then maybe consider renaming the field.
... View more
05-11-2023
09:10 AM
|
0
|
0
|
1722
|
|
POST
|
@bcarpenter87 wrote: Like what is seen in the gdb? Yes, that is what @DavidPike was getting at regarding the "feature class/table names rather than their aliases." You would need to update that text file, replacing the alias name you have with the actual name in the gdb. If that's not reasonable and those are infact the actual alias names, I suppose you can still do it, there'd just be a few extra steps. Either way, how I would do it is create a dictionary where the key is the gdb fc name and value is a list (or better yet a set, in case of duplicates) of field names that need to be deleted for that feature class. Then loop through your dictionary items and DeleteField one by one. It'll probably take a while with that many fields. Also keep in mind that you won't be able to delete system generated fields like ObjectID and GlobalID so prepare to handle that.
... View more
05-08-2023
02:27 PM
|
0
|
0
|
7603
|
|
IDEA
|
It would be nice to be able to create Interactive Legend instant apps that can utilize symbology from Arcade expressions. Here's a thread with my original intent: Solved: Re: Interactive Legend isn't interactive when usin... - Esri Community
... View more
05-08-2023
01:59 PM
|
5
|
0
|
695
|
|
POST
|
Thank you for confirming. Would it be appropriate to request this feature in ArcGIS Ideas?
... View more
05-08-2023
01:24 PM
|
0
|
1
|
2257
|
|
POST
|
When creating an Interactive Legend Instant App, the interactive legend isn't enabled when the layer in the web map is styled as unique symbol with an Arcade expression. Even something simple like this (giving true or false in the legend) drops the "interactivity" of the legend in the app. IsEmpty($feature["Some_Field"]) Is this a bug or am I doing something wrong? Edit: This is on ArcGIS Enterprise 11.0
... View more
05-04-2023
01:25 PM
|
0
|
3
|
2321
|
|
POST
|
On the right side of the documentation there is a thumbs up/down. Pressing one of those will then give you a link to send additional feedback. I have had good luck with someone responding to my documentation feedback.
... View more
05-04-2023
12:02 PM
|
0
|
1
|
1199
|
|
POST
|
I'm running into the same thing. I'm trying to export an item from an Open Data site so it doesn't need a user name. However, it errors on item.export(), yielding AttributeError: 'NoneType' object has no attribute 'username' traceback is from "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 11928, in export data_path = "content/users/%s/export" % self._gis.users.me.username It seems export requires a username? What should I do?
... View more
05-03-2023
04:50 PM
|
0
|
0
|
5967
|
|
POST
|
How is features being created? Maybe log features to the console before you call it in your function so you can inspect its contents and ensure there's a geometry property and you're accessing it correctly.
... View more
05-03-2023
01:51 PM
|
0
|
1
|
1746
|
|
POST
|
I'm intentionally being vague so as not to deprive you of a learning opportunity. The Esri documentation for arcpy is pretty good. Take a look at the ListSubtypes, ListFields, and ListDomains functions.
... View more
05-03-2023
09:58 AM
|
0
|
0
|
1962
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2025 03:53 PM | |
| 1 | 04-28-2026 07:25 AM | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM | |
| 1 | 12-01-2025 06:19 AM |