POST
|
Can you try isempty function? ar fs = FeatureSetByName($datastore,'Parcels_OCPA_Web',["PARCEL"],FALSE);
if (isempty(geometry($feature))) return;
var interlayer = Intersects(fs, $feature);
var cnt = Count(interlayer);
var billing = $feature.MultiUserType
if (TypeOf($feature) == null) {
ParcelID = $feature.ParcelID
}
else if ((cnt > 0) && (billing != "D: Delete")) {
var interpid = First(interlayer);
return interpid.PARCEL;
}
... View more
Tuesday
|
0
|
1
|
73
|
POST
|
The error essentially say you tried to update a feature that doesn't exist. So we need to debug to see what the rule is passing.. I see you are using 2.9.10, is it possible to move to 2.9.12? we included many fixes for attribute rules and relationships there plus we also included the ability to print the console output to the debug diagnostics in Pro. I included the updated rule with few changes.. Run the rule while ArcGIS Pro monitor is running (debug mode) (CTRL+ALT+M), and look for the console output , I added **** to make searching easy, see what output you get, this will tell us more. var globalId = $feature.globalid
var lstatus = $feature.LSTATUS;
var tableToUpdate = "EW";
var fs = FeatureSetByName($datastore, "EW", ["globalid"], false);
var feats = Filter(fs,'CGUID = @globalId');
var editDict = {'className': tableToUpdate, 'updates': []};
var updateCount = 0;
var updateList = [];
for(var feat in feats)
{
var updateDict = {'GlobalID': feat.globalid, 'attributes': {"lstatus": lstatus}};
updateList[updateCount++] = updateDict
}
//if no matches simply return.
if (updateCount == 0) $feature.comments;
editDict[updates] = updateList;
//print out
console("******" + text(editDict))
return {'edit': editList};
... View more
05-14-2024
08:50 AM
|
0
|
0
|
192
|
POST
|
I think you might just ran into this issue https://community.esri.com/t5/attribute-rules-questions/cannot-save-calculation-rule-after-making-any/m-p/1418156#M1428
... View more
05-07-2024
09:55 AM
|
0
|
0
|
478
|
BLOG
|
Thanks Linda, You see rules often are downloaded to the client application (e.g. ArcGIS Pro) so when you make the edit the rule is executed in the application locally first (like Pro) then the modified row is sent to the backend (be it a service or geodatabase) where it will be executed again. so if this option is checked it means that this rule will execute on the backend and not locally in the application. So in the first case you will see the change immediately, while in the second case you will have to wait for the server/backend to finish processing your edit, built a service edits payload (things that has changed in the server) and return to the client application, the application then takes those changes and applies them locally to the display/caches where it will show up. So yes little delay but the delay is equal to the time of the actual edit. hope that helps There is a devsummit session I did where I go into that in details https://mediaspace.esri.com/media/t/1_gr7hrdjy
... View more
05-02-2024
03:43 PM
|
0
|
0
|
376
|
POST
|
That is because attribute rules are triggered on updating any field. the target field you set on the attribute rule view is the field you want to set the value to, not the field you that you want triggering the rule. Updating any field will trigger the rule
... View more
05-02-2024
12:31 PM
|
0
|
2
|
194
|
POST
|
Unfortunately in complex recursive case like this where the child updates the parent and the parent updates the child we need more context in the attribute rule itself. Currently it is not possible to differentiate between an edit made as a side effect of attribute rule vs an edit that is made directly by the user. Adding that field allows us hint us to know is this edit done by the user or is it a result of a propagation from parent which will allow us to continue propagation vs to stop. The field can be added but hidden so users don't see it. Without this knowledge, parent updates child, which triggers the rule to update the parent which then triggers the rule again to update the child.
... View more
05-02-2024
11:20 AM
|
0
|
4
|
209
|
POST
|
Yeah there is a bug here, we are suppose to yell at you that you can't pass variables to FeatureSetByName, because we need the name to be static so we can resolve the table name to a registered geodatabase catalog id. Change your script wherever you have a featuresetbyname and pass in a literal string instead. for example FeatureSetByName($datastore, addresspoint_fc, ['*'], true), firstPoint); to , this and it should solve the problem FeatureSetByName($datastore, "AddressPoint", ['*'], true), firstPoint); Meanwhile we will fix the bug where it tells you the exact the error message instead of 9999 error. it shouldn't even let you save it to begin with.
... View more
05-02-2024
08:35 AM
|
1
|
1
|
210
|
POST
|
I think I addressed a similar issue here https://community.esri.com/t5/attribute-rules-questions/error-quot-rules-is-cyclic-or-exceeds-maximum/m-p/1394354/highlight/true#M1345 there is an attached geodatabase with the example code. This is similar to what you are trying to do, still uses a foreign key (but no actual relationship class), they have a groupId in the feature, when a certain field gets updated they want all the features with same groupid to have the same value of that field. The video explains it The trick is to avoid calling or triggering the attribute rule when we don't need to, I think your code is almost there, just need to add an additional check before globalid check if(f.GlobalID == $feature.GlobalID) { continue } if(f.childfield== $feature.parentfield) continue;
... View more
05-02-2024
08:10 AM
|
0
|
6
|
228
|
POST
|
Hey Cole, Can you share your pro version and the rule script you are working with? does this problem occur in the attribute rules view as well? Does it work with simple rules? like create a new rule with return 0; can you then update it to add a comment? want to see if this is data specific or something else.
... View more
05-01-2024
03:23 PM
|
0
|
3
|
279
|
POST
|
To add to this thread, when using Console with attribute rules we write a debug entry in both server manager logs and ArcGIS Pro Monitor diagnostics. This helps tremendously in debugging. Here is a simple example This was first introduced in Pro 3.2/11.2 and the fix has been ported to the following patches - ArcGIS Pro 3.0.6 - ArcGIS Pro 3.1.3 - ArcGIS Pro 2.9.11 - ArcGIS Server 10.8.1 Utility Network and Data Management Patch 11 - ArcGIS Server 10.9.1 Utility Network and Data Management Patch 6 - ArcGIS Server 11.1 Utility Network and Data Management Patch 2
... View more
04-25-2024
09:20 AM
|
1
|
0
|
311
|
POST
|
Hey James, we will have to fix that page in the doc, the Validation rules and batch calculation rules execute on demand via the evaluate call and not on user edits. So $originalFeature isn't applicable. If you think about it the edit has already been made, running evaluate we have no idea what happened to the feature
... View more
04-24-2024
03:41 PM
|
0
|
1
|
167
|
POST
|
Yes, you simply change the split model from update/insert to, delete insert insert
... View more
04-02-2024
02:12 PM
|
0
|
1
|
265
|
POST
|
This should not be possible , as NextSequenceValue simply queries the database for the next sequence (using .nextval) and databases often handle that really well. It could be that the app is overwriting the value somehow via an update. Check the creation user/last updated for the duplicate unique id which one is newer is probably the duplicate, also to be safe make the field uneditable. If you are using branch versioning or archiving you can use the history to investigate how the unique id happened to be. Do you know what is the database?
... View more
04-01-2024
04:15 PM
|
0
|
2
|
155
|
POST
|
Edit: I went back to 2.9.11/ 3.1/3.2 and I'm getting the correct behavior (split only generates one sequence) Make sure when you test, create a new line feature, then do the split. this will generates a new sequence number for the line, but then the split will use the next value. If you discard the edits the sequence is not returned (will be burned)
... View more
04-01-2024
09:11 AM
|
0
|
0
|
213
|
Title | Kudos | Posted |
---|---|---|
1 | 05-02-2024 08:35 AM | |
1 | 04-25-2024 09:20 AM | |
1 | 08-08-2022 10:29 AM | |
1 | 03-11-2024 01:09 PM | |
1 | 03-08-2024 10:51 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|