|
POST
|
If you go to configure your app, Stage 3 - Nearby Scroll down and just below the 'Default distance settings' there is a 'Search Units' setting which you can change to Miles.
... View more
04-01-2023
01:21 PM
|
0
|
1
|
1252
|
|
POST
|
Out of interest what were the entries needing removed? The most recent entry for each GUID would be set to 0, but additional logic could be added to do a DateDiff with date.now(), although the time period would only really make sense at the time of computation.
... View more
03-31-2023
12:29 PM
|
0
|
1
|
2466
|
|
POST
|
I think it's a tough one to fix over several years. The Arcade function ToUTC() probably wouldn't make a difference considering it's already stored in UTC and an offset is being applied for daylight savings. How many years does the data span? A Field Calculation could run to take an hour off any datetimes within the BST window.
... View more
03-31-2023
04:21 AM
|
0
|
2
|
3311
|
|
POST
|
you need to add your 2 arguments into my_func() above the code block - duration = ... my_func(!inspection_date!, !guid!)
... View more
03-30-2023
01:49 PM
|
0
|
3
|
2481
|
|
POST
|
I'm not sure the widget can just take a time, you may need to extract the Hour and Minute and add it to an arbitrary date, then use the time slider as normal (with 15 minute display window). So field calculate your records and make them occur on all the same day (1 Jan 2023): //example, replace with your date field
var yourDate = Date('2023-03-01 10:36:00')
//change to any arbitrary date you want
//e.g. $feature.date
var arbitrary = Date('2023-01-01 00:00:00')
//calculate number of minutes from midnight
var minutes = Hour(yourDate) * 60 + Minute(yourDate)
//add minutes to arbitrary date (e.g. 1 Jan 2023)
var result = DateAdd(arbitrary, minutes, 'minutes')
return result Another option is to not use the widget, and just display your times by grouped symbology per time interval. There' s an excellent blog here - https://www.esri.com/arcgis-blog/products/mapping/mapping/unwinding-the-clock-visualizing-time-with-arcade/ This section from the blog details how to group by hour of the day: At what time of day was the incident reported (morning, afternoon, evening)? var t = Hour($feature.Created_Date);
When(
t >= 22 || t < 6, "Night",
t >= 6 && t < 11, "Morning",
t >= 11 && t < 13, "Midday",
t >= 13 && t < 17, "Afternoon",
t >= 17 && t < 22, "Evening",
"Invalid date" ); Your code might look something like this: (There's obviously going to be a better function to create this but it might help you for the moment) //replace example datetime with $feature.youorDateColumn
var now = Date('2022-01-01 10:34:00')
//get minutes from midnight
var m = Hour(now) * 60 + Minute(now)
When(
t >= 0 || t < 15, "Midnight - 12:15am",
t >= 15 && t < 30, "12:15am - 12:30am",
t >= 30 && t < 45, "12:30am - 12:45am",
t >= 45 && t < 60, "12:45am - 1:00am",
t >= 60 && t < 75, "1:00am - 1:15am and so on...",
"Invalid date" );
... View more
03-30-2023
12:45 PM
|
0
|
5
|
3344
|
|
POST
|
can you give details of the 2 feature classes, bound/domains and coordinate systems? Do love a good screenshot also.
... View more
03-30-2023
09:47 AM
|
0
|
1
|
9463
|
|
POST
|
May be well outside the bounds of the coordinate system of the feature class also.
... View more
03-30-2023
09:28 AM
|
0
|
3
|
9476
|
|
POST
|
Seems to be a common issue. MXDs did have a refreshActiveView which I cant see for Pro. This hack might be worth a go: https://gis.stackexchange.com/questions/283750/why-would-arcpy-applysymbologyfromlayer-tool-not-work-in-arcgis-pro-python-windo "I found that passing a layer object through the ApplySymbologyFromLayer() function, as the first arg, does not work. For whatever reason, you should pass a string through it. So basically change your line from:" in_layer = arcpy.ApplySymbologyFromLayer_management(in_layer,in_symbology_layer,update_symbology="MAINTAIN")[0] to: in_layer = arcpy.ApplySymbologyFromLayer_management(str(in_layer),in_symbology_layer,update_symbology="MAINTAIN")[0]
... View more
03-30-2023
09:17 AM
|
1
|
0
|
14652
|
|
POST
|
Ah ok, did my solution work? If so please mark as correct for future users.
... View more
03-30-2023
09:12 AM
|
0
|
0
|
3842
|
|
POST
|
Hmmmm, possibly creat a new id field (Text/String) and field calculate the GUID into it.
... View more
03-30-2023
09:11 AM
|
0
|
5
|
2497
|
|
POST
|
Trying a simple test I can only get a single selection even with a GROUP BY - which I guess is a scalar subquery result. Trying to replicate your query with variations of ORs and ANDs just caused strange unexpected selections. I don't think subqueries are the way to go with an FGDB. Recommend Jeff's cursor.
... View more
03-30-2023
06:15 AM
|
0
|
0
|
1593
|
|
POST
|
How did you solve the problem? I'd recommend posting a new question as it seems unrelated to the first issue.
... View more
03-30-2023
05:18 AM
|
1
|
2
|
3852
|
|
POST
|
I think the simplest way is actually using field calculator. As you say, you first need to sort your data first by GUID, then by datetime DESCENDING. you need to physically reorder the table using https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/sort.htm sorting just the attribute table view and running field calculator won't work as the internal cursor is by ObjectID (I believe) #imports
import datetime
#create variables to store the global id and datetime
#records from the previous iteration
prev_dtime=''
prev_gid=''
#your datetime field, your globalid field
def my_func(dtime, gid):
#make your globals
global prev_dtime
global prev_gid
try:
#if global ids match
if gid == prev_gid:
difference = dtime - prev_dtime
#hours difference from previous record (sorted desc so it's actually
#the next record)
return float(difference.total_seconds()/3600)
except:
#return whatever you like if error etc
return -999
finally:
#update the prev dtime and gid for the next iteration
prev_dtime = dtime
prev_gid = gid After you run this (obviously create a new float field to calculate into) you could also then summarize by GUID attribute and get the totals (definition query or filter out any 'open' values first e.g. 'FIELD LIKE 'Open') Might get you started anyway
... View more
03-29-2023
01:59 PM
|
1
|
7
|
2527
|
|
POST
|
Probably very close to Null island - Gulf of Guinea? When you add XY data, ensure you set the projection as WGS1984 EPSG 4326. This will ensure Lat Lon is used, as I'm guessing it's taking the data frame coordinate system which is likely Web Mercator.
... View more
03-28-2023
10:50 AM
|
0
|
4
|
3875
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-17-2023 12:44 PM | |
| 1 | 06-13-2025 01:08 PM | |
| 1 | 09-25-2025 03:19 PM | |
| 1 | 09-24-2025 02:35 PM | |
| 1 | 09-17-2025 02:42 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-06-2026
06:42 AM
|