|
POST
|
Hi @brandonmann3, You could set it to identify if the future date is greater than now which would solve your issue. Add now() < $feature.start_closure to the first if statement and now() < $feature.end_closure to the second if statement and that should work.
... View more
12-29-2023
03:42 PM
|
1
|
3
|
3076
|
|
POST
|
Hi @brandonmann3, Try this: var A = DateDiff(Now(), $feature.start_closure , 'days' )
var B = DateDiff(Now(), $feature.end_closure , 'days' )
var Condition = Null
if ( A <= 7 ){ Condition = "Active last week" }
else if ( B <= 7 && A > 7 ){ Condition = "Ended Last Week" }
else { Condition = "Other" }
Console( Condition )
return Condition
... View more
12-28-2023
12:14 PM
|
1
|
0
|
3104
|
|
POST
|
Hi, This isn't an issue but it is something that has caught my attention. What caught my attention is the Sort function in the set of functions shown in pro for feature sets but the web documentation doesn't mention the Sort function at all. Just something that I came across.
... View more
12-21-2023
06:47 AM
|
0
|
0
|
875
|
|
IDEA
|
We ran into the same issue so one of the ways we looking into using is the option for editors to update a field with 'Remove' or 'Delete' as a coded domain value and then have a script document the deletion before it is deleted. You could also use Arcade to do something similar and have the record updated by the editor and before it is deleted in the feature/table. At least till something better comes around.
... View more
12-20-2023
01:11 PM
|
0
|
0
|
1338
|
|
DOC
|
The other thing that I found useful regarding dictionaries is tuples can be used as keys. For instance: import random
coords = [ (random.random()*2.0, random.random()*2.0) for _ in range(50) ]
coords = { coord : {'OBJECTID' : number + 1 } for number,coord in enumerate( coords ) }
testcoord = list( coords )[ 0 ]
print (coords[ testcoord ])
... View more
12-20-2023
01:01 PM
|
0
|
0
|
12389
|
|
IDEA
|
Hi @AndrewRudin1, Have you tried using python's os module as mentioned before. It may not be necessary for there to be an arcpy module since the os module can get the file size, modification date, and so forth already exists.
... View more
12-19-2023
10:44 AM
|
0
|
0
|
1710
|
|
POST
|
Hi, I am not sure if this is possible or not but I am trying to update a related table from another feature based on changes in the specified date field. Originally I was specifying all of the fields that needed to be inserted. Rather than specifying all of the fields directly; I would like to get all of the attributes based on matching fields. Here is what I have thus far. //_______""" Functions for modifying the related table """_________
// Get matching field names
function GetMatchingFields( FieldListA, FieldListB ){
var MatchingFields = [ ]
for ( var i in FieldListA ){
var fieldname = FieldListA[i]
if ( Includes( FieldListB , fieldname ) ){
Push( MatchingFields, fieldname )
}
}
return MatchingFields
}
// Get field names from input features
function GetFieldNames( InputFeature ){
var FieldNames = [ ]
var FeatureInfo = Schema(InputFeature).fields
for ( var i in FeatureInfo ){
Push( FieldNames , FeatureInfo[ i ].name )
}
return FieldNames
}
//_______""" Specify Variables """_________
var FeatureClassName = 'Insert Featureclass Name'
var TableName = 'Insert Table Name'
var FeatureID = $feature.OBJECTID
var InspDate = $feature.InspectionDate
var IDField = 'OBJECTID'
var DateField = 'InspectionDate'
var Order = DateField + ' DESC'
// Order the features by the date field descending
var History = OrderBy( FeatureSetByName( $datastore, TableName ) , Order )
var Hydrants = $featureset
// Get matching field names found in both features
var MatchingFields = GetMatchingFields( GetFieldNames( Hydrants ), GetFieldNames( History ) )
// If the date has a count greater than 1 then populate the list with unique dates
var DateCount = Count( Filter( Hydrants, DateField + ' = @InspDate' ) )
while ( DateCount != 0 ){
var DateChange = DateAdd( InspDate , DateCount, 'seconds')
var DateCheck = Count( Filter( Hydrants, DateField + ' = @DateChange' ) )
if ( DateCheck == 0 ){
var InspDate = DateChange
break
}
else { var DateCheck = DateCheck - 1 }
}
return InspDate
// Filter feature by criteria
var FilteredFeature = First( Filter( History, DateField + ' = @InspDate' ) )
// Insert records into the related table if the date does not exist in the related table
var Values = First( Filter( FeatureSetByName($datastore, FeatureClassName , MatchingFields ), DateField + ' = @InspDate' ) )
if ( InspDate > First( History )[ DateField ] ){
Console( 'Inserting record from @FeatureClassName into @TableName' )
return {
"result": InspDate,
"edit": [ {
// Specify the related table
"className" : TableName,
//the type of edit, in this case we want to add so we say `adds`, its an array since we can make many inserts
"adds" : [ {
// Add the current feature data based on the object id of the filtered data
"attributes": Values
} ]
} ]
}
}
else if ( InspDate == FilteredFeature[ DateField ] ) {
Console( 'Updating record from @FeatureClassName into @TableName' )
return {
"result": InspDate,
"edit": [ {
// Specify the related table
"className" : Table,
//the type of edit, in this case we want to add so we say `adds`, its an array since we can make many inserts
"updates" : [ {
// Specify the object id of the feature
IDField : FilteredFeature[ IDField ],
// Add the current feature data based on the object id of the filtered data
"attributes": Values
} ]
} ]
}
} I am not sure if I correctly wrote this script to do just that or if there is a simpler solution that already exists. Any help would be greatly appreciated.
... View more
12-19-2023
05:02 AM
|
0
|
0
|
1203
|
|
POST
|
Hi, I been having issues as of late with registering a table view with our enterprise sde database. The table view queries data from another table in another SQL server database using a linked server object. Despite several attempts to register the table view; I cannot seem to get it to register. I don't know if anyone else has encountered issues like this, but any help would be greatly appreciated.
... View more
12-07-2023
05:05 AM
|
0
|
1
|
1511
|
|
POST
|
That is something we are going to test eventually but as for now I mostly need it to update a feature class and another table. I have two rules right now that will update both, and I am curious to see what is possible since this is my first time working with views.
... View more
12-05-2023
01:24 PM
|
0
|
0
|
1415
|
|
POST
|
Hi, I wasn't sure about this, but I wanted to ask. Is it possible to use attribute rules on table views created in a sde database. The reason for asking is we created a view that pulls data from another sde table using a linked server that gets updated every so often and it would be great if attribute rules can be applied to these kinds of tables. This would significantly automate a lot of things and wouldn't require additional scripting. I can write a script in python to search through and update the other features, if need be, but I would rather keep things simple and contained as possible.
... View more
12-05-2023
11:38 AM
|
0
|
2
|
1490
|
|
POST
|
I managed to get it to work after debugging it for quite some time. I know it is typically not suitable to rename imports but I was merely doing so to simplify copying and pasting as well as reducing the length of the module name since some modules have ridiculously long names.
... View more
12-05-2023
06:11 AM
|
0
|
0
|
2527
|
|
POST
|
It is possible. We are currently doing the same thing and I have created an attribute rule that will not only insert a record into a related table whenever there is a new inspection on a hydrant but also update the same record if something in the record changes. Right now, the rule is set to insert/update from the hydrant feature service to the related table. However, it is possible to create attribute rules where both features can update one another.
... View more
11-29-2023
12:35 PM
|
0
|
0
|
1722
|
|
POST
|
Hi, I was wondering if anyone who utilizes Motorola CAD has had any issues regarding the version update for ArcGIS Pro from 2.X to 3.X. Since we updated, the tools that created the locators to be consumed by CAD no longer work. Basically the locators is Motorola CAD do not seem to be compatible with this latest version of ArcGIS Pro. Has anyone else, who uses Motorola CAD for their 911 Dispatch, have any issues since updating to the newest version of ArcGIS Pro?
... View more
11-29-2023
12:21 PM
|
1
|
4
|
3929
|
|
POST
|
So you would want to run either the make closest facility layer tool or the make service area layer tool in the network analysis ribbon or toolbox. Running the make closest facility tool will create a layer that will create a line layer of all locations within a specified drivetime/distance. Running the make service area tool will create a layer that will create a polygon that shows the area of a specified drivetime/distance. Then you can identify all potential points within that polygon.
... View more
11-29-2023
12:14 PM
|
0
|
0
|
914
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 05-07-2026 01:36 PM | |
| 1 | 02-10-2026 06:09 AM | |
| 1 | 03-04-2026 01:08 PM | |
| 1 | 02-24-2026 12:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|