|
IDEA
|
There isn't an out of the box way to do it but you can script it with an options table as I show here https://community.esri.com/t5/attribute-rules-blog/how-to-toggle-constraint-and-calculation-attribute/ba-p/1387438
... View more
02-27-2024
07:35 AM
|
0
|
0
|
2426
|
|
BLOG
|
We hear this requirement very often from customers in geonet and the conferences; Is there a way to temporarily disable all immediate attribute rules? While out of the box there isn't a way to do that as it requires changing the schema (physically disabling each rule and stopping any services), I thought I'd share a workaround for users who really want to implement this in their system. By adding an "options" table with a column EnableAR, we can have each rule before it executes checks this table and reads the value at runtime. If the value is 0 the rule immediately returns, if the value is 1 the rule logic executes as normal. I made an example here (attached) and a video to demonstrate With this approach you can quickly toggle all attribute rules execution and you can even control what type rules you want to enable and disable. The downside of this is you have to update all your rules to start using this check, but once you do you are good to go. The other thing to watch out for is in multi-user environment one user can toggle this option to disable the rule and post it to DEFAULT effectively disabling the rules for all users which is something you might not want. You can of course add additional checks to prevent this logic in DEFAULT using the gdbVersion function. Filegdb with code attached
... View more
02-27-2024
07:34 AM
|
2
|
4
|
2531
|
|
POST
|
Thanks I can reproduce it looks like a bug when the association is being added in multiple payloads, we will take a look. Meanwhile the workaround is to group all associations in one payload. return {
"edit": [
{
"className" : "ElectricDistributionJunctionObject",
"adds" : [{
"tag": "unit1",
"attributes": {
"assetgroup": 2,
"assetType": 1}
}]},
{
"className": "^UN_Association",
"adds": [{
"fromClass": "ElectricDistributionJunctionObject",
"fromGlobalId": $feature.GLOBALID,
"toClass": "ElectricDistributionJunctionObject",
"toGlobalId": "unit1.globalID",
"associationType": "containment"
},
{
"fromClass": "ElectricDistributionJunctionObject",
"fromGlobalId": $feature.GLOBALID,
"toClass": "ElectricDistributionJunctionObject",
"toGlobalId": "unit1.globalID",
"fromTerminal": "Source",
"associationType": "connectivity"
},
{
"fromClass": "ElectricDistributionJunctionObject",
"fromGlobalId": $feature.GLOBALID,
"toClass": "ElectricDistributionJunctionObject",
"toGlobalId": "unit1.globalID",
"fromTerminal": "Load",
"associationType": "connectivity"
}
]},
]
}
... View more
02-19-2024
10:25 AM
|
0
|
2
|
1534
|
|
POST
|
No known issues in 3.2, all scripts should just work. Looking at the code I see you are using a variable LBCode where it is not defined, this might be a bug in 3.1 that we fixed in 3.2 (we start detecting undefined variables), you might have meant to use attributeValue instead. thanks I would suggest for performance avoiding using the count here and just do first and check for null and only ask for you are using. here is the rewritten script with the LBCode fixed. var intersectLayer = FeatureSetByName($datastore, "Lsgd_Boundary", ['LBCode'], false);
var attributeName = 'LBCode';
var intersectingFeatures = Intersects(intersectLayer, $feature);
var intersectedFeature = First(intersectingFeatures);
if (intersectedFeature == null) return 'NA';
var attributeValue = intersectedFeature[attributeName];
// Generate a unique sequence number
var id = NextSequenceValue("uniqueid");
// Concatenate LBCode and the unique sequence number
var projectID = attributeValue + "-" + id;
return projectID;
... View more
12-27-2023
08:38 AM
|
1
|
2
|
2211
|
|
POST
|
Good question and yes that is the split contract as we have written it for consistency . The longer piece gets the "update" of the geometry while the shorter one gets to be inserted that is why the shorter one gets the new ID because that is where the logic to generate id lives.
... View more
11-01-2023
03:04 PM
|
0
|
0
|
2916
|
|
POST
|
hey Katherine i see this is a direct connect sde connection, can you try on a filegdb and see if you see the same behavior? and also is it possible to send a data (with just one "bad" polygon) that reproduces feel free to take any fields/ data that is not relevant. your code looks correct so my guess it might be the spatial reference ..
... View more
09-08-2023
12:30 PM
|
0
|
1
|
4436
|
|
POST
|
So you want to add a constraint rule on the attachment table that says something like this if ($feature.DATA_SIZE > 1000) return false;
return true;
... View more
09-07-2023
12:26 PM
|
0
|
1
|
1320
|
|
POST
|
Hey Carlos Do you know version of Pro are you using for this (and is this filegdb or mobilegdb?) Is this a relationship? or something you maintain manually if it is relationship we have fixed few bugs with attribute rules eventing and patched them to 2.9.10/3.0.6 and 3.1.3 make sure you are using those. I'm attaching a sample for insert/update and delete. This is a pole feature that is related to an inspection table. (one pole has many inspections), every time you add an inspection record the count of inspections (a field on the pole) gets updated. if you delete it gets updated accordingly, this only work with the fixes in the patches mentioned.
... View more
08-29-2023
07:14 AM
|
0
|
1
|
2454
|
|
POST
|
Hey Kade, this bug is a known issue that has been fixed in 11.1 and ported back to 10.9.1 Patch 5 (ArcGIS Server 10.9.1 Utility Network and Data Management Patch 5) Can you try on those platforms if possible? If you feel this need to be ported back to 11.0 you may contact support and request a hotfix bug reference BUG-000160904 thanks
... View more
08-24-2023
10:15 AM
|
0
|
0
|
1525
|
|
POST
|
certainly! c is a variable, and when we say c++ this translate to add 1 to the value of c this whole thing is for us to start building a payload so essentially each tree gets its own payload tree 0 -> payload 0 tree 1-> payload 1 etc... and so on..
... View more
08-24-2023
09:15 AM
|
1
|
0
|
2004
|
|
POST
|
Yes it is possible by returning an edit dictionary against the attributed relationshipclass table, here is a sample filegdb . script var fs = FeatureSetByName($datastore, "tree");
var fsInt = intersects(fs, $feature);
var payload = [];
var c = 0;
for (var t in fsInt)
{
payload[c++] = {"attributes": { "treeGUID": t.globalid, "areaGUID": $feature.globalid} }
}
return {
"edit": [{"className": "tree_trimarea",
"adds": payload
}]
}
... View more
08-23-2023
02:26 PM
|
1
|
0
|
2028
|
|
POST
|
it is as @JohannesLindner suggested, one thing I would add for performance reason, remove the count query, you are essentially executing two queries, replace it with this var relationship = FeatureSetByRelationshipName($feature, 'RelationshipName', ['TreeSpecies'], false);
// check size of FeatureSet, return null if empty
//if(Count(relationship) == 0) { return null }
var f = First(relationship);
if (f == null) return null; //if no features exist quit..
return f.TreeSpecies
... View more
08-11-2023
01:25 PM
|
1
|
2
|
1443
|
|
POST
|
The easiest way is to set the rule to execute on Insert, and then change the split-policy on the line to delete-insert-insert. This way when you do a split, what will really happen is 3 events The original long line will be deleted. (if you have a delete AR it will trigger here) the first segment will be inserted (to the left anchor) and attribute rule will be triggered the second segment will be inserted (to the right of the split anchor) and attribute rules will be triggered on insert all attributes are preserved from the original line (essentially duplicated) you can handle the same thing with the existing split policy (update insert) its just little harder. you can change the split policy from the properties of the class.
... View more
07-25-2023
10:30 AM
|
0
|
3
|
3082
|
|
POST
|
One way is to make an make a change to a batch calculation rule (e.g. add a comment), this will reset all batch calculation validationstatus. The other way to edit to the features (any field will reset the validationstatus)
... View more
07-25-2023
10:02 AM
|
0
|
0
|
1333
|
|
POST
|
Correct, if you were using the geometry on the citylimit feature then you would want to return geometry. I think you need to guard against null. As First() might not return any result. var fs = FeatureSetByName($datastore,"City_Limits",["TOWN"],false);
var intFs = Intersects(fs, Geometry($feature));
var cityLimit = First(intFs)
//if the cityLimit feature is null do an early exit.
if (cityLimit == null) return;
return {
'result':{
'attributes':{
'MUNICIPALITY':cityLimit.TOWN
}
}
}
... View more
07-18-2023
02:33 PM
|
2
|
4
|
4658
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-19-2026 09:52 AM | |
| 1 | 03-19-2026 06:18 AM | |
| 3 | 01-26-2026 02:25 PM | |
| 3 | 01-05-2026 03:50 PM | |
| 5 | 12-30-2025 10:25 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-19-2026
06:14 AM
|