POST
|
Expects($feature, 'DATE_INSPECTION');
if ($originalfeature.DATE_INSPECTION == $feature.DATE_INSPECTION) {
return
}
var fs = FeatureSetByRelationshipName($feature, "OCGIS.DPW_TESTING_REL", ['DATE_1', 'GLOBALID'], false);
var parent_feat = First(fs);
if (IsEmpty(parent_feat)) {
return;
}
if (parent_feat.DATE_1 > $feature.DATE_INSPECTION) {
return
}
return {
"edit": [
{
"className": "OCGIS.DPW_TESTING",
"updates": [{
"globalID": parent_feat.globalid,
"attributes": {
"DATE_1": $feature.DATE_INSPECTION
}]
}
]
}
... View more
Thursday
|
0
|
1
|
80
|
POST
|
You are trying to access a row that not listed in the FeatureSet, make sure you list all the fields you need to use on the parent feature in the 3rd parameters var fs = FeatureSetByRelationshipName($feature, "OCGIS.DPW_TESTING_REL", ['DATE_1', 'GLOBALID'], false); to var fs = FeatureSetByRelationshipName($feature, "OCGIS.DPW_TESTING_REL", ['DATE_INSPECTION ', 'GLOBALID'], false); But then you are mixing fields later on in the return statement. What date fields are on the parent and what are on the child?
... View more
Thursday
|
0
|
0
|
85
|
POST
|
A picture would help, but I think so. The batch trace just stores starting locations in a table. It allows you to group those starting points by a value. It then runs 1 trace for each group. The build starting points help generate those groups.
... View more
Thursday
|
0
|
0
|
90
|
POST
|
Yes this rule would be assigned to the child table. As for code changes, that is an exercise for the reader.
... View more
Thursday
|
0
|
2
|
94
|
POST
|
You only need and E-J-E if you do not want the Edge to end with a Junction. Also, for this rule to be enforced(create a Error Feature), you need to ensure you do not have an E-J rule for those AG/ATs. Lets use a pipe example. I want a Pipe to connect to a Pipe through a Union. I never want a Pipe to end at a Union(if so, water would be flowing into the ground). So I could use a Pipe To Pipe Via Union.
... View more
Thursday
|
0
|
0
|
139
|
POST
|
This should work. If the parent features date is less than the edited child feature, update the parent. Expects($feature, 'DATEFIELD');
if ($originalfeature.DATEFIELD == $feature.DATEFIELD) {
return
}
var fs = FeatureSetByRelationshipName($feature, "RELNAME", ['DATEFIELD', 'GLOBALID'], false);
var parent_feat = First(fs);
if (IsEmpty(parent_feat)) {
return;
}
if (parent_feat.DATEFIELD > $feature.DATEFIELD) {
return
}
return {
"edit": [
{
"className": "PARENTFCNAME",
"updates": [{
"globalID": parent_feat.globalid,
"attributes": {
"Size": $feature.DATEFIELD
}]
}
]
}
... View more
Thursday
|
0
|
4
|
108
|
POST
|
This one is a little harder, be easier to write if you can share a sample dataset. The most performant, would be that we query the table the related record is using the foreign key to get the other records. We then create a sort function by date to get the current date. Then use that key or FSbyRelationship to get the parent record and update it if needed.
... View more
Wednesday
|
0
|
6
|
154
|
POST
|
Just need to loop over the FeatureSet and build a list of return values if ($originalfeature.Size == $feature.Size) {
return
}
var fs = FeatureSetByRelationshipName($feature, "OCGIS.DPW_TESTING_REL");
var updates = [];
for (var feat in fs) {
Push(updates, {
"globalID": feat.globalid,
"attributes": {
"Size": $feature.Size
}
});
}
return {
"edit": [
{
"className": "OCGIS.DPW_TESTING_Table",
"updates": updates
}
]
}
... View more
Wednesday
|
0
|
1
|
51
|
POST
|
tool was moved to https://github.com/Esri/arcade-expressions/tree/master/attribute_assistant
... View more
Wednesday
|
0
|
0
|
37
|
POST
|
I would set your filter barriers to be like this: and here are the results:
... View more
Wednesday
|
1
|
0
|
67
|
POST
|
If you are using services, you need to check the ArcGIS Server log as the rules are run the GDB and arcgis pro does not have access to their execution.
... View more
a week ago
|
1
|
0
|
113
|
POST
|
That is fine then, just make sure all those valve types are set to the isolation category and use that category as the filter barrier in the isolation trace.
... View more
a week ago
|
0
|
4
|
57
|
POST
|
I think you will need to use a function like this: function closest_item(feat_set) {
var closest_feature = null;
var closest_distance = INFINITY;
var feat_geo = Geometry($feature);
for (var feat in feat_set) {
var current_distance = Distance(feat_geo, Geometry(feat), 'meters');
if (current_distance < closest_distance) {
closest_feature = feat;
closest_distance = current_distance;
}
}
return closest_feature;
}
... View more
a week ago
|
0
|
0
|
34
|
Title | Kudos | Posted |
---|---|---|
1 | 03-04-2024 03:20 AM | |
1 | Wednesday | |
1 | a week ago | |
1 | a month ago | |
1 | 2 weeks ago |
Online Status |
Offline
|
Date Last Visited |
yesterday
|