POST
|
Found my issue. It ended up being two things. One I was calling out the row in two different areas and the count field was not processing correctly in my if statement was I turned the count into a string then it found the 0 values. Here is my final working one. epath = Elog2
efile = open(epath, 'a')
etable = ElectricDup
fields = ['meternum','assetid']
today = str(date.today())
total = 0
count_row = str(arcpy.management.GetCount(
in_rows = etable)
)
print (count_row)
if count_row == '0':
print ("Empty List")
efile.write("No Duplicate Meters on " + today + "\n")
else:
with arcpy.da.SearchCursor(etable,fields) as cursor:
for row in cursor:
print ("Meter {} is duplicated on Asset ID {}".format(row[0],row[1]))
efile.write("Recorded On " + today + " Meter {} is duplicated on Asset ID {}".format(row[0],row[1]) + "\n")
efile.close()
... View more
05-10-2024
02:21 PM
|
0
|
1
|
333
|
POST
|
Let me start with I'm very new to Python so please bare with me. I have created a python script that deletes a feature layer "ElectricMeterDuplicates" out of a GDB, runs some other calculations commands and then exports the results back into the original GDB as a feature layer with the same name. That part is all working correctly until I get to my text file I want to write results to. I could have one of two situations. 1. the new feature layer contains 2 or more rows of data, here I want it to write to the text file the information form 2 fields for each row of data. OR the feature layer is empty and here I want it to write to the file I simple message of no data . I have written the below script. When I run it in Notebook within Pro it correctly writes to the text file if there is data, however, if there is no data it doesn't write anything. When I run this as a standalone script through a bat file (which is my end goal, the entire thing errors out with ERROR 000732: Input Rows: Dataset ElectricMeterDuplicates does not exist or is not supported and doesn't write anything to the text file no matter the situation. epath = r"Z:\General\Projects\Utility\Scripts\DuplicateMeters\Logs\ElectricDupMeters.txt"
efile = open(epath, 'a')
etable = r"Z:\General\Projects\Utility\Scripts\DuplicateMeters\DuplicateMeters.gdb\ElectricMeterDuplicates"
fields = ['meternum','assetid']
today = str(date.today())
total = 0
row = arcpy.management.GetCount(
in_rows="ElectricMeterDuplicates"
)
print (row)
if row == 0:
print ("Empty List")
efile.write("No Duplicate Meters on " + today + "\n")
else:
with arcpy.da.SearchCursor(etable,fields) as cursor:
for row in cursor:
print ("Meter {} is duplicated on Asset ID {}".format(row[0],row[1]))
efile.write("Recorded On " + today + " Meter {} is duplicated on Asset ID {}".format(row[0],row[1]) + "\n")
efile.close()
... View more
05-03-2024
02:17 PM
|
0
|
3
|
481
|
POST
|
Thank you @TonghuiMing, Support also confirmed that it is a Bug in Enterprise version 10.9.1.
... View more
05-03-2024
06:13 AM
|
1
|
0
|
266
|
POST
|
I have an Experience Builder App set up with 2 pages, both with their own maps. When navigating between the pages I have ran into an issue with the map tools where they do not close out when you switch pages and stays hovering on the next page until I click the X to close out. For example on Page 1 I open the layer list via page 1 map, then I switch to page 2, the layer list from page 1 map is still being shown on the screen, until I close it. Same thing happens if I open the layer list on page 2 map and go to page 1, I will continue to see the layer list on page 1 until I close out of it. I have tested multiple map tools and all of them I tested did this. The only time it doesn't happen is when it is sized down for mobile devices. This Experience Builder app is in my 10.9.1 Enterprise Portal.
... View more
04-29-2024
09:53 AM
|
0
|
2
|
380
|
IDEA
|
We are walking service lines and mains. The thickness of the tracks sometimes hinders seeing our points and lines that we need to be paying attention too. I agree that the ability to adjust this is needed.
... View more
04-01-2024
12:02 PM
|
0
|
0
|
396
|
POST
|
Thank you so much @jcarlson , I thought the advanced formatting was just for the visual format, didn't realize I could use a calculation and then add {expression/duration} in the config. This worked perfectly!!!
... View more
01-24-2024
12:34 PM
|
1
|
0
|
847
|
POST
|
I'm trying to create a data expression in the List of a Dashboard to pull statistics from the different status of several features. I have set the Group By expression on my status field and calculated the SUM on many of the fields and have that working. The part I can't figure out is I want to determine the duration taken to complete the entire project for each category. So I need to take the lowest start date from all the features in said category and the highest end date from the same category and Difference them. So in each category I know how many days it took overall. Note, some features start date or end date may overlap as we would have one person starting and ending in one area, and another person starting and ending in a different area at different times. This is what I have so far, I just don't how to fit the variable durationcalc into the group by so it returns it as part of the table for each category. //Define Portal Item and Fields
var fs = FeatureSetByPortalItem(Portal('portal'), 'item', feature, ['surveystatus','belowleaks1','belowleaks2','belowleaks3','aboveleaks1','aboveleaks2','aboveleaks3','footagemains','numberservices','startdate','enddate'],false);
//define duration
var sdate = Min(fs, 'startdate');
var edate = Max(fs, 'enddate');
var durationcalc = DateDiff(edate, sdate, 'days');
//Group By Survey Status and calc Sums on leaks
return GroupBy(fs, ['surveystatus'], [
{ name: 'Underground Leaks Class 1', expression: 'belowleaks1', statistic: 'SUM' },
{ name: 'Underground Leaks Class 2', expression: 'belowleaks2', statistic: 'SUM' },
{ name: 'Underground Leaks Class 3', expression: 'belowleaks3', statistic: 'SUM' },
{ name: 'Aboveground Leaks Class 1', expression: 'aboveleaks1', statistic: 'SUM' },
{ name: 'Aboveground Leaks Class 2', expression: 'aboveleaks2', statistic: 'SUM' },
{ name: 'Aboveground Leaks Class 3', expression: 'aboveleaks3', statistic: 'SUM' },
{ name: 'Miles of Main', expression: 'footagemains', statistic: 'SUM' },
{ name: 'Num of Services', expression: 'numberservices', statistic: 'SUM' },
//Determine the earliest start date of all features and the latest end date of all features
{ name: 'Start Date', expression: 'startdate', statistic: 'MIN' },
{ name: 'End Date', expression: 'enddate', statistic: 'MAX' },])
... View more
01-24-2024
08:10 AM
|
0
|
2
|
928
|
DOC
|
@TomDeWitte I watched the Leak Survey video on https://storymaps.arcgis.com/stories/1355f649a6b14eb6a5cd22f43f455464 and then found this download. These two doesn't seem to line up correctly. The video shows you marking points of found locations of leaks and the above download only has the survey area along with the attribute rules for just that. I did look in the UN and I found several layers similar to the video but none of the attribute rules are present. Where is the complete package with the survey area, point layer for leaks, and potential repairs along with all the associated attribute rules that make them work all together?
... View more
12-08-2023
01:58 PM
|
0
|
0
|
965
|
POST
|
I'm not sure on the effects. However, I have created arcade if/or/else expressions in my symbology of the web map, that if the attribute of a field is equal to x then make it this symbol else make it this symbol. I'm utilizing it in Field maps and works pretty slick. As soon as they fill out the attribute and hit submit it changes the point from one symbol to the other.
... View more
08-10-2023
02:58 PM
|
0
|
0
|
374
|
POST
|
Do you have any attribute rules set on the feature layer that could be causing the issue. I was having a similar issue and once I disabled the attribute rule then it started working again. It wasn't one that we were using so I was fine disabling instead of looking for the root cause of it breaking.
... View more
06-30-2023
12:34 PM
|
0
|
0
|
241
|
POST
|
I worked with ESRI support on this issue. It was determined if the database is Branch versioned than this workflow will not work and creates the Cannot Access Data issue in Dashboards. If the data is not versioned than there is no issue. ESRI support is working on logging a defect on this issue. The workaround I found is to use Query Layers. Support also said database views would work also, but I did not test.
... View more
06-30-2023
12:19 PM
|
0
|
0
|
353
|
DOC
|
@jschuckert I have successfully, been able to implement symbology change based off date stamps utilizing custom arcade expressions in the Style section of the Web Map. Here is an example of one. This works in Field Maps, Web app Builder, and Dashboard seamlessly. The only downfall is if you modify the expression, then you have to reset up all your symbology again. var tdate = Now(); var insp = Date($feature.lastmaint); var pastdue = DateAdd(tdate, -110, 'days'); var duesoon = DateAdd(tdate, -60, 'days'); if (insp < pastdue) { return 'Due'} else if (insp < duesoon) { return 'Due Soon'} else { return 'Completed'}
... View more
06-29-2023
06:17 AM
|
0
|
0
|
1219
|
POST
|
I have a layer hydrant and a related table hydrant inspection that live in an Enterprise SDE. I want to visualize the hydrants based on if certain fields have been marked Yes or No in the hydrant Inspection table. On the hydrant Inspection table I did a definition query of "maintcomplete IS NULL And followup = 1" so it only give me records saying that it needs follow up and that follow up hasn't been completed. I then joined by hydrant layer to the the hydrant Inspection record with the definition query. I then Shared this as a Map Image Services to my portal. I'm now able to visualize the hydrant that have the follow up marked as 1 (Yes) and the layer updates as new inspections are added via Field Maps or as the Maintenance Completed field is filled out. I then go to put this functioning Web Map into a Dashboard and the indicator widget or other items to be able to see data on this layer and when I select this joined feature service within Dashboard I get "Cannot Access Data". I go to the Server Manager logs and I'm getting "Geodatabase error: The SQL statement was not a select statement." Does Dashboards have the ability to pull data from the Joined feature services? I'm able to view the table of attributes of this Joined feature service in the web map without issue. Or do I need to modify my definition query?
... View more
05-17-2023
09:33 AM
|
1
|
2
|
418
|
IDEA
|
@KellyHutchins I'm in Enterprise Portal 10.9.1 and within the Search configuration there is a zoom scale I can set with a slider. The first issue the slider is not sensitive enough for smaller scales it is hard to to position it under 2000 and the second thing is it doesn't matter where I set it, it always zoom to the extent of one of the polygon results.
... View more
03-07-2023
12:40 PM
|
0
|
0
|
520
|
IDEA
|
We need the ability in the zone lookup to set the zoom level. Zooming to the the polygon is not feasable in some circumstances because the Polygon is half the county. We won't to be able to zoom into the block the address is in. The old version of lookup in 10.8 had the ability to zoom into the address that was being selected. This or just setting the zoom level would be nice.
... View more
03-07-2023
08:57 AM
|
1
|
3
|
542
|
Title | Kudos | Posted |
---|---|---|
1 | 07-25-2024 07:20 AM | |
2 | 07-17-2024 07:58 AM | |
1 | 05-03-2024 06:13 AM | |
2 | 11-24-2021 08:54 AM | |
1 | 01-24-2024 12:34 PM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|