IDEA
|
Hi, I thought it would be really helpful if editor tracking for attribute rules could be added as additional functionality when attribute rules are created. One of the issues that I find, especially when troubleshooting attribute rules, is I get error messages in Field Maps stating invalid arcade expression. It doesn't tell me specifically which rule caused the issue nor can I identify which rule since there is no information regarding when and by whom the attribute rule was created or modified. I think that having the ability to identify when and whom made changes to the attribute rules would be really helpful in identifying when an attribute rule changed to make troubleshooting easier.
... View more
03-07-2024
06:09 AM
|
1
|
0
|
154
|
POST
|
Here is what I use which might be of some help. This function gets field names in a feature that are not in the list of omitted field names. If there isn't a list of field names to omit, include all field names. function GetFieldNames( InputFeature , OmitFields ){
var FieldNames = [ ]
var FeatureInfo = Schema(InputFeature).fields
for ( var i in FeatureInfo ){
// Get the field name of the input feature
var fieldname = FeatureInfo[ i ].name
if ( Boolean( OmitFields ) ) {
if ( Includes( OmitFields , fieldname ) == False ) { Push( FieldNames , fieldname ) }
}
else { Push( FieldNames , fieldname ) }
return FieldNames
} This function finds all matching field names between two features. // Get matching field names found in both lists
function GetMatchingFields( FieldListA, FieldListB ){
var MatchingFields = [ ]
// Loop through the list of field names in list A
for ( var i in FieldListA ){
var fieldname = FieldListA[i]
/* If list of field names in list B includes the field name in list A
then append the field name to the matching list of field names */
if ( Includes( FieldListB , fieldname ) ){ Push( MatchingFields, fieldname ) }
}
return MatchingFields
} This one gets all attributes from a feature based on input field names. // Get feature attributes based on field list
function GetFeatureAttributes( FieldList ){
Expects( $feature , '*' )
var Attributes = Dictionary( $feature ).attributes
var SpecificAttributes = { }
if ( IsEmpty( FieldList ) == False ){
for ( var f in FieldList ){
SpecificAttributes[ FieldList[ f ] ] = Attributes[ FieldList[ f ] ]
}
}
else { SpecificAttributes = Attributes }
return SpecificAttributes
} These may be of some use to you but I have used these to automate a lot of attribute rules. It also takes the guess work out of having to do things manually. You can also use the get matching field names function with the get field names function(s) as inputs. MatchingFieldNames = GetMatchingFields( GetFieldNames( InputFeature , OmitFields ), GetFieldNames( InputFeature , OmitFields ))
... View more
02-12-2024
12:56 PM
|
1
|
0
|
350
|
POST
|
Hi @EMiller_2, Without knowing what the string looks like, it could be that the code is not set properly or there are other characters in the string that is preventing the character replacements. An option to fix this is: """Expression"""
Expression = NewString( Field or Value )
"""Code Block"""
def NewString( InsertString ):
New = None
if type( InsertString ) != str: pass
else:
if ',' in InsertString:
New = InsertString.split( ',' )
New = '_'.join( New )
else: pass
if New: return New
else: return
... View more
02-12-2024
12:20 PM
|
0
|
1
|
308
|
IDEA
|
You can set to limit the map to only the extent of a specified shape within a map series, and you can also specify exceptions for displaying layers. This is set in the map properties. Or this option can be set within the map series setting.
... View more
01-25-2024
10:29 AM
|
0
|
0
|
373
|
IDEA
|
It would be nice to be able to ask/share arcade code snippets that otherwise would be difficult to find in all of the other locations given that arcade is now being used for other things rather than simply labeling. It would also be helpful if a code repository can also be established for code that has been successfully executed for others.
... View more
01-22-2024
01:16 PM
|
0
|
0
|
167
|
IDEA
|
Hi, I thought it would be a great idea if there was a way to create a custom rule repository for calculations for an organization. This would make it easier to be able to select specific rules rather than having to copy and paste or import a rule from another location.
... View more
01-10-2024
09:21 AM
|
0
|
0
|
155
|
IDEA
|
Hi, I would really like for additional attribute rule functionality to be able to retrieve matching fields, records etc. and to also have editing capabilities. Thus far most of those functionalities have to be scripted in but I was wondering if it could be set as a function rather than something that has to be scripted. // Get matching field names found in both lists
function GetMatchingFields( FieldListA, FieldListB ){
var MatchingFields = [ ]
// Loop through the list of field names in list A
for ( var i in FieldListA ){
var fieldname = FieldListA[i]
/* If list of field names in list B includes the field name in list A
then append the field name to the matching list of field names */
if ( Includes( FieldListB , fieldname ) ){ Push( MatchingFields, fieldname ) }
}
return MatchingFields
} // Get field names from input features
function GetFieldNames( InputFeature , OmitFields ){
var FieldNames = [ ]
var FeatureInfo = Schema(InputFeature).fields
for ( var i in FeatureInfo ){
// Get the field name of the input feature
var fieldname = FeatureInfo[ i ].name
if ( Boolean( OmitFields ) ) {
if ( Includes( OmitFields , fieldname ) == False ) { Push( FieldNames , fieldname ) }
}
else { Push( FieldNames , fieldname ) }
return FieldNames
} // Get feature attributes based on field list
function GetFeatureAttributes( FieldList ){
Expects( $feature , '*' )
var Attributes = Dictionary( $feature ).attributes
var SpecificAttributes = { }
if ( IsEmpty( FieldList ) == False ){
for ( var f in FieldList ){
SpecificAttributes[ FieldList[ f ] ] = Attributes[ FieldList[ f ] ]
}
}
else { SpecificAttributes = Attributes }
return SpecificAttributes
}
... View more
01-04-2024
06:40 AM
|
0
|
0
|
259
|
IDEA
|
You can change the order of rule by double clicking on the order number and typing in the order that you wish.
... View more
01-04-2024
05:51 AM
|
0
|
0
|
469
|
IDEA
|
You can always change the order of a rule by simply double clicking on the order number and changing it manually to the desired order.
... View more
01-02-2024
01:05 PM
|
0
|
0
|
339
|
POST
|
@brandonmann3 if ( A <= 7 && now() < $feature.start_closure ) else if ( B <= 7 && A > 7 && now() < $feature.end_closure ) OR var start = $feature.start_closure
var end = $feature.end_closure
var A = DateDiff(Now(), start , 'days' )
var B = DateDiff(Now(), end , 'days' )
var Condition = Null
if ( A <= 7 && start < now()){ Condition = "Active last week" }
else if ( B <= 7 && A > 7 && end < now() ){ Condition = "Ended Last Week" }
else { Condition = "Other" }
Console( Condition )
return Condition Insert either of the characters below in parentheses if you want to combine statements && is equal to 'AND' || is equal to 'OR'
... View more
01-02-2024
11:11 AM
|
1
|
1
|
443
|
POST
|
Hi, Currently I encountered a bit of an issue regarding bulk editing where selected records get updated with the same date. Is there an arcade script that will change all of the dates by one second so that each date is unique. I don't know if there is a way to modify bulk edits on the same feature class but I am hoping there might be some solution(s) to this.
... View more
01-02-2024
07:08 AM
|
0
|
1
|
294
|
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
|
479
|
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
|
507
|
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
|
232
|
Title | Kudos | Posted |
---|---|---|
1 | yesterday | |
1 | Tuesday | |
1 | 2 weeks ago | |
2 | 2 weeks ago | |
4 | 3 weeks ago |