|
POST
|
I am able to reproduce that error IF there is a value in the label field that is null or does not contain a comma..... Along with @JohannesLindner stated, you can also put some console() statements in there to see what is actually being returned from the representative row: RhettZufelt_0-1684179068009.png R_
... View more
05-15-2023
12:33 PM
|
0
|
0
|
1320
|
|
POST
|
Where are you trying to write the label expression? I see these fields and am able to utilize them in label expression in 2.9.3 and 3.1.1. RhettZufelt_0-1684166114970.png R_
... View more
05-15-2023
08:56 AM
|
0
|
0
|
1146
|
|
POST
|
With leading/trailing spaces already stripped: >>> s = 'John Smith'
>>> splitString = s.split(" ")
>>> splitString
['John', 'Smith']
>>> len(splitString)
2
>>>
>>>
>>> s = 'John J Smith'
>>> splitString = s.split(" ")
>>> splitString
['John', 'J', 'Smith']
>>> len(splitString)
3
>>> You can also iterate through the split string and count the number of 'spaces'. this would be more robust if there could be more than one space in between owner names: numSpaces = 0
for splstr in splitString:
if splstr == '' or splstr is None:
numSpaces +=1
print(numSpaces) You can split the string by " " (space) and then see the length of the resultant string. Won't really help if there are multiple spaces in a row, but the len() will let you know if there is more than two components to the name. Not sure if it works for you, but at least a coule ideas of "counting" spaces in the strings. R_
... View more
05-15-2023
08:28 AM
|
0
|
0
|
3473
|
|
POST
|
From first post: "So if there are 500 signs in the area they worked in, they updated about 450 of them, and the other 50 are not in their data." Last post: "I want to replace the corresponding records from the original layer with these 70 records, and keep the other 30 records" Based on that, it sounds like if the feature is in the Vendor data, then it HAS been updated and you want to replace the Main dataset features with these... In your pic above, it appears as if that is what you are showing. If it is in the vendors data, you have it displayed as red to delete. So, when you establish the join, un-check the "Keep All Target Features" box, and you will only get a list of the matching features (red in above), then you can select all of them, and delete. In your example above, if you were to right click on the Vendor's Data column and sort descending, it will move the matching rows to the top, you can select any that have value in Vendors data column and delete. Or, put definition query where Vendor's data is not null will show only matching features, and then select/delete. Several ways to do the same thing. Whichever method, after the delete, just copy/paste or append the vendor data back in. R_
... View more
05-11-2023
01:32 PM
|
0
|
1
|
4173
|
|
POST
|
Does the map open properly in new map viewer? If so, do you get the Form option there? R_
... View more
05-11-2023
01:05 PM
|
0
|
0
|
2829
|
|
POST
|
You can use a search cursor to populate a list of the SignID's in the Vendor dataset. Then you can select by attribute in the Main dataset by that list, and delete any that match. This will delete any features in the Main dataset that is also in the Vendor dataset. Since you just deleted them from the Main dataset, append the 'updated' Vendor dataset back to the main. I use something very similar to: import arcpy
arcpy.env.preserveGlobalIds = True
MySigns = r'\\pathtodata\signs.sde\signs.DBO.OrigSigns'
VendorSigns = r'\\pathtodat\vendorsigns.sde\vendorsigns.DBO.VendorSigns'
VendorSignList = []
with arcpy.da.SearchCursor(VendorSigns,"SignID") as cursor:
for row in cursor:
VendorSignList.append(row[0])
DBO_Sign_Layer, Count = arcpy.management.SelectLayerByAttribute(in_layer_or_view=MySigns, selection_type="NEW_SELECTION", where_clause="SignID IN ('" + '\',\''.join(VendorSignList) + "')")
Updated_Input_With_Rows_Removed = arcpy.management.DeleteRows(in_rows=DBO_Sign_Layer)[0]
MySigns = arcpy.management.Append(inputs=[VendorSigns], target=MySigns, schema_type="TEST", field_mapping="", subtype="")[0]
#MySigns = arcpy.management.Append(inputs=[VendorSigns], target=MySigns, schema_type="TEST", field_mapping="", subtype="", expression="SignID IN ('" + '\',\''.join(VendorSignList) + "')")[0] Since you are appending all the data from the Vendor data, you could omit the where_clause in the append. I already had it in there for appending a subset, so I left it for example (commented out line). In this case, since is the same list (VendorSignList), it would be the same as omitting it. In Pro, without python, this would be the same as joining the Vendor list table to the Main list feature class, with keep only matching values. Delete all the matching values, append the Vendor data to the Main feature class. Of course, advise thorough testing of copys of the datasets before applying to prod. R_
... View more
05-11-2023
12:48 PM
|
0
|
1
|
4211
|
|
POST
|
I believe the resampling method environ setting only applies to GP tools that honor that setting. When you set Resampling Type in the Raster layer Rendering tab as in your attached pic, that is only for displaying the raster, and doesn't change the data at all. You can change the default method in the options so that it will always render raster with that type, but don't know of a way to get at this with code. RhettZufelt_0-1683830881870.png R_
... View more
05-11-2023
11:48 AM
|
0
|
1
|
1987
|
|
POST
|
Guess I should have payed more attention to the original post. I had Insert enabled on the tool, so was a bit different. Even so, I was not able to reproduce with just update, and was still geting the correct count (testing with data from SQL server EGDB): RhettZufelt_0-1683731224285.png However, when testing with the same feature class/attribute rule exported to a FGDB feature class: RhettZufelt_1-1683731297999.png I am then consistently getting the actual count + 1 as you are seeing. So, since they report different values from the same rule/data, just different sources, I'd suspect you have discovered yet another bug. Might want to start a tech support request so that this issue might get addressed. R_
... View more
05-10-2023
08:12 AM
|
0
|
0
|
2779
|
|
POST
|
Not sure about portal, but AGOL that can be set in the item details of the HFL. Can be set for each layer in the HFS: RhettZufelt_0-1683646936716.png R_
... View more
05-09-2023
08:43 AM
|
0
|
2
|
4907
|
|
POST
|
Maybe run the check geometry tool and see if there is a invalid geometry or something. I get the exact count using your code in 2.9.3 and 3.1.1 R_ Actually, on second thought, I think it is working as expected. If you have 8 values in there already, then try to add one, it should be number 9. However, since it is showing as error message, it is what "would" be there if it were to create the feature (since feature isn't created on error). Perhaps try updating the field instead of returning an erromessage and see if that "fixes" it: count(FeatureSetbyName($datastore, "Room")) R_
... View more
05-09-2023
08:20 AM
|
0
|
0
|
2792
|
|
POST
|
So, sounds like maybe you have a combination of layer with joins and/or views going on. List by source will show you all layers AND tables that are currently loaded into your map document (image show View, Table, and Feature Class): RhettZufelt_6-1683589895786.png You can right click the layer in ArcMap, properties, source tab to show you the layer/table name/location: RhettZufelt_1-1683589132135.png If you have joins or relates, you can look in the Joins and Relates tab to see what tables are joined or related: RhettZufelt_2-1683589161775.png For views, you can find the data location in the source tab, then get properties in ArcCatalog, the definition will show the SQL that creates the view: RhettZufelt_3-1683589290142.png And if you have relationship classes set up in the database, you can get that info from the Relationships tab in the properties in ArcCatalog. RhettZufelt_4-1683589609838.png R_
... View more
05-08-2023
04:52 PM
|
0
|
0
|
672
|
|
POST
|
Or if you have an Alias set on it. That is why I used Centerlines as example, not Urban Growth Area (that is alias, but, it IS the table alias). Just trying to clarify what a table that provides data for a layer is..... R_
... View more
05-08-2023
12:29 PM
|
0
|
1
|
4044
|
|
POST
|
I just that that was one of the 'updates' with Pro 🙂 Even using the Add Join tool: RhettZufelt_0-1683572811790.png Then look at the results of that join: RhettZufelt_1-1683572830772.png R_
... View more
05-08-2023
12:07 PM
|
0
|
0
|
5120
|
|
POST
|
Are you talking about joined/related tables? Basically, in my example above, "Centerlines" is a table in the geodatabase. It also has shape field holding the geometry so Arc can display it as a feature class when added. So, the table "name" would be "Centerlines". If you right-click on it and open attribute table you can view it. R_
... View more
05-08-2023
11:54 AM
|
0
|
3
|
4049
|
|
POST
|
@PLadd Upon furthur testing, I see both the GP tool (Table to Domain) and arcpy.management.TableToDomain both work as expected, and will give an error if you try to append a duplicate domain value. Might be a workaround in the meantime. R_
... View more
05-08-2023
10:53 AM
|
0
|
0
|
3189
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-14-2026 04:00 PM | |
| 1 | 09-14-2022 07:53 AM | |
| 1 | 09-14-2022 08:23 AM | |
| 1 | 05-21-2026 08:53 AM | |
| 1 | 05-14-2026 04:28 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|