|
IDEA
|
When publishing branch versioned data for the first time changing from traditional versioning, allow for required fields to be turned on by the right-click option in the 'Share As Web Layer' pane. I received 465 errors which I have to go into each layer and turn on all fields that are required to be turned on to publish branch versioned data to Portal. Being able to select the errors, right-click and choose 'turn on field' would be a great improvement.
... View more
07-29-2021
10:00 AM
|
3
|
0
|
844
|
|
POST
|
Had to make some updates, but the below solution worked. fc = "D:\\WorkSpace\\Water\\Workspace.gdb\\NewAccountsGeocoded"
fields = ['USER_MunisAccount','IN_Single_Line_Input']
qry = "Status NOT IN ( 'M', 'T')"
with arcpy.da.SearchCursor(fc, fields, qry) as cursor:
for row in cursor:
print(row [0], row [1])
txtFile.write("{0}{1}".format(arcpy.GetMessages(), '\n'))
HOST = "server.domain.com"
SUBJECT = "Report: Unable to Add UB Accounts to GIS Accounts"
TO = "symon@email.com", "dave@email.com", "brian@email.com"
FROM = "Water Accounts<GIS@email.com>"
text = "The following UB Account was not able to be imported into GIS WtrAccounts. Please see if there is an error in UB or if the address exists in COH Address GIS feature class. \n " + "UB Account: "+str(row[0]) + " | UB Address: "+str(row[1])+"\n"
BODY = "From: {1}{0}To: {2}{0}Subject: {3}{0}{0}{4}".format('\r\n', FROM, TO, SUBJECT, text)
server = smtplib.SMTP(HOST)
server.sendmail(FROM, TO, BODY)
server.quit()
... View more
07-29-2021
08:19 AM
|
0
|
0
|
2532
|
|
POST
|
So I got the code to work and email to a single address like the commented out line 11, but in trying to send to multiple email addresses like in line 10 it fails with the error message below. unhashable type: 'list' fc = "D:\\WorkSpace\\Water\\Workspace.gdb\\NewAccountsGeocoded"
fields = ['USER_MunisAccount','IN_Single_Line_Input']
qry = "Status NOT IN ( 'M', 'T')"
with arcpy.da.SearchCursor(fc, fields, qry) as cursor:
for row in cursor:
print(row [0], row [1])
txtFile.write("{0}{1}".format(arcpy.GetMessages(), '\n'))
HOST = "server.email.com"
SUBJECT = "Report: Unable to Add UB Accounts to GIS Accounts"
TO = ["symon@email.com","dave@email.com","brian@email.com"]
#TO = "brian@email.com"
FROM = "Water Accounts<GIS@email.com>"
text = "The following UB Account was not able to be imported into GIS WtrAccounts. Please see if there is an error in UB or if the address exists in COH Address GIS feature class. \n " + "UB Account: "+str(row[0]) + " | UB Address: "+str(row[1])+"\n"
BODY = "From: {1}{0}To: {2}{0}Subject: {3}{0}{0}{4}".format('\r\n', FROM, TO, SUBJECT, text)
server = smtplib.SMTP(HOST)
server.sendmail(FROM, [TO], BODY)
server.quit()
... View more
07-28-2021
03:11 PM
|
0
|
0
|
2553
|
|
POST
|
Thank you Dan, I updated the code below for lines 2, 3, and 4 based on the ESRI documentation, and still getting the error the field 'MunisAccount' does not exist. My guess is something in row 5 or row 13 is the issue? arcpy.SelectLayerByAttribute_management("NewAccountsGeocoded_Layer", "NEW_SELECTION", "Status NOT IN ( 'M', 'T')")
fc = "D:\\WorkSpace\\Water\\Workspace.gdb\\NewAccountsGeocoded"
fields = ['MunisAccount']
for row in arcpy.SearchCursor(fc, fields):
print((row.MunisAccount, row.ARC_Single_Line_Input))
arcpy.AddMessage("Water_ID_Updates Failed...{0}".format('\n'))
txtFile.write("Water_ID_Updates Failed...{0}".format('\n'))
txtFile.write("{0}{1}".format(arcpy.GetMessages(), '\n'))
HOST = "server.host.com"
SUBJECT = "Report: Unable to Add UB Accounts to GIS Accounts"
TO = "brian@email.com"
FROM = "Water Accounts<email@email.com>"
text = "The following UB Account was not able to be imported into GIS WtrAccounts. Please see if there is an error in UB or if the address exists in COH Address GIS feature class. \n " + "UB Account: "+str(row.MunisAccount) + " | UB Address: "+str(row.ARC_Single_Line_Input)+"\n"
BODY = "From: {1}{0}To: {2}{0}Subject: {3}{0}{0}{4}".format('\r\n', FROM, TO, SUBJECT, text)
server = smtplib.SMTP(HOST)
server.sendmail(FROM, [TO], BODY)
server.quit()
... View more
07-28-2021
07:47 AM
|
0
|
0
|
2563
|
|
POST
|
In migrating from Python 2.x to 3.x, we had a process that emails water accounts that are unable to be geocoded and added to our meter feature class. There was no change to the schema, but recently we had the below failure. The field still exists named 'MunisAccount' in the NewAccountsGeocoded feature class. Error received: Row: Field MunisAccount does not exist arcpy.MakeFeatureLayer_management("D:\\WorkSpace\\Water\\Workspace.gdb\\NewAccountsGeocoded", "NewAccountsGeocoded_Layer", "", "", "")
arcpy.SelectLayerByAttribute_management("NewAccountsGeocoded_Layer", "NEW_SELECTION", "Status NOT IN ( 'M', 'T')")
for row in arcpy.SearchCursor("NewAccountsGeocoded_Layer"):
print (row.MunisAccount, row.ARC_Single_Line_Input)
arcpy.AddMessage("Water_ID_Updates Failed...{0}".format('\n'))
txtFile.write("Water_ID_Updates Failed...{0}".format('\n'))
txtFile.write("{0}{1}".format(arcpy.GetMessages(), '\n'))
HOST = "server.host.com"
SUBJECT = "Report: Unable to Add UB Accounts to GIS Accounts"
TO = "brian@email.com"
FROM = "Water Accounts<email@email.com>"
text = "The following UB Account was not able to be imported into GIS WtrAccounts. Please see if there is an error in UB or if the address exists in COH Address GIS feature class. \n " + "UB Account: "+str(row.MunisAccount) + " | UB Address: "+str(row.ARC_Single_Line_Input)+"\n"
BODY = "From: {1}{0}To: {2}{0}Subject: {3}{0}{0}{4}".format('\r\n', FROM, TO, SUBJECT, text)
server = smtplib.SMTP(HOST)
server.sendmail(FROM, [TO], BODY)
server.quit()
... View more
07-27-2021
11:14 AM
|
0
|
6
|
2614
|
|
IDEA
|
In ArcGIS Desktop under Data Reviewer Tools, there was a tool that performed a GDB schema comparison. This appears to have been deprecated with no viable replacement in ArcGIS Pro. Being able to compare GDB schemas between a parent/child or production/development database is very beneficial. Are there any plans to bring this back into Pro? The Pro version I am on is 2.6.2.
... View more
06-24-2021
10:15 AM
|
22
|
8
|
6713
|
|
IDEA
|
In ArcMap, on the table of contents window, you can list data by source. From there, you can remove data from the TOC at the source level and remove all of the data from that data source. This functionality is not available in Pro (at least at version 2.6.2). Being able to remove data from a TOC in batch via the same source without having to highlight all the layers would be a good addition to bring over from ArcMap.
... View more
05-20-2021
01:39 PM
|
0
|
1
|
1454
|
|
IDEA
|
In creating database sequences, there is not a streamlined way to view database sequences that have been created. I have seen other posts of using Python to list database sequences, but that seems to only be applicable to file geodatabase and not enterprise databases. List Database Sequences for Enterprise Geodatabase Being able to view database sequences in a database would be beneficial, especially as these can interact with attribute rules to auto-generate values. Viewing along the same lines as you can for attribute rules, domains, subtypes, etc.
... View more
04-28-2021
09:38 AM
|
46
|
19
|
13064
|
|
POST
|
Thank you @KenBuja I tried again and I got the below to work based on your feedback. I also created a new label class just for where the description is business so I was not trying to do so much in one label class. Thank you very much for your help! var d = $feature.Description
var s = $feature.SitusNum
var u = $feature.UnitNum
var b = $feature.BuildingNum
return When(d == 'BUSINESS',
IIf(!IsEmpty(b) && !IsEmpty(u), b + ' - ' + u,
IIf(!IsEmpty(b), b,
IIf(!IsEmpty(u), u, s)
)
),
null) .
... View more
04-28-2021
08:05 AM
|
3
|
1
|
26656
|
|
POST
|
Thank you @KenBuja , So I get the below error when trying to update on my end. It is a direct copy and paste, all I did was keep the '$feature.' in front of each variable.
... View more
04-27-2021
01:50 PM
|
0
|
3
|
26685
|
|
IDEA
|
I agree with this, it seems along the same lines of replicating domains, editor tracking, etc. Database Replication should support replication of attribute rules.
... View more
04-27-2021
12:26 PM
|
0
|
0
|
4272
|
|
POST
|
We have a description field in our address feature class and one of the values is 'BUSINESS'. We have two other fields, Unit Number and Building Number. In working to migrate labeling language from VB Script to Arcade, we would like to label on the following conditions: Applies to all where the description is BUSINESS - If the building number is not null, label the building number and not the situs number. - if the unit number is not null, label the unit number and not the situs number. - If the building and unit numbers are both NULL, label the situs number - Not often, but if both unit number and building number are both not null, label both unit number and building number, do not label situs number Below is the code that I currently am working with. The portion that pertains to my question is where the description is 'BUSINESS'. var d = $feature.Description
var s = $feature.SitusNum
var u = $feature.UnitNum
var b = $feature.BuildingNum
if(d == 'SINGLE'){
return s
} else if(d == 'TOWNHOME'){
return s
} else if(d == 'ACCESSORY DWELLING'){
if(IsEmpty(u)){
return s}
else{
return s + ' - ' + u}
} else if(d == 'DUPLEX'){
if(IsEmpty(u)){
return s}
else{
return s + ' - ' + u}
} else if(d == 'MANUFACTURED'){
if(IsEmpty(u)){
return s}
else{
return s + ' - ' + u}
} else if(d == 'CONDO'){
if(IsEmpty(u)){
return s}
else{
return u}
} else if(d == 'MULTIFAMILY'){
if(IsEmpty(u)){
return s}
else{
return u}
} else if(d == 'BUSINESS'){
if(IsEmpty(b)){
return s}
else{
return b}
} else if(d == 'BUSINESS'){
if(IsEmpty(u)){
return s}
else{
return u}
} else if(d == 'CARE FACILITY'){
if(IsEmpty(u)){
return s}
else{
return u}
} else if(d == 'PRIVATE PARK'){
return s
} else if(d == 'PUBLIC FACILITY'){
if(IsEmpty(u)){
return s}
else{
return u}
} else if(d == 'GARAGE'){
if(IsEmpty(u)){
return s}
else{
return u}
} else if(d == 'PARKING GARAGE'){
return s
} else if(d == 'STORAGE UNIT'){
if(IsEmpty(u)){
return s}
else{
return u}
}
... View more
04-27-2021
11:47 AM
|
0
|
7
|
26742
|
|
POST
|
@jcarlson , would you have any knowledge as to how to treat labeling an address with the same description based on the code snippets from above. Below, if a feature is a business, I am trying to label the building number only, not the situs number if a building number exists. In the same scope of work, I am also trying to label a business on the unit number only if a unit number exists. }else if(d == 'BUSINESS'){
if(IsEmpty(u)){
return s}
else{
return u}
} else if(d == 'BUSINESS'){
if(IsEmpty(b)){
return s}
else{
return b}
}
... View more
04-26-2021
01:56 PM
|
0
|
0
|
4795
|
|
POST
|
Thank you both for your assistance on this, greatly appreciated.
... View more
04-26-2021
08:43 AM
|
0
|
0
|
4833
|
|
POST
|
So when I enter that, it shows that there is a reserved keyword on line 10. else{
... View more
04-26-2021
08:13 AM
|
0
|
3
|
4866
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | yesterday | |
| 2 | Wednesday | |
| 1 | Tuesday | |
| 2 | a week ago | |
| 5 | a week ago |
| Online Status |
Online
|
| Date Last Visited |
5 hours ago
|