Here is the scenario:
for a newly created feature:
1. get the center point of the feature polygon.
2. use the point to query specific layers and get specific values. these layers are in the same map.
3. enter the values to the corresponding fields in the feature.
Like to use attribute rule to do this task so the drilldown values are entered during the feature creation. Not sure if it is doable
We use Oracle/SDE database.
Thanks
Solved! Go to Solution.
You can certainly Copy the value of an intersecting feature using an Attribute Calculation Rule. Have a look at this ESRI Github Repo for examples.
// Calculation Rule
// Triggers: Insert
// create centroid
var cent = Centroid($feature)
// repeat this block for each intersecting feature class (change variable names!)
/////
var intersect_feature = First(Intersects(FeatureClassByName($map, "FeatureClass"), cent))
var value = null
if(intersect_feature != null) {
value = intersect_feature.Value
}
/////
// return the values
return {
"result": {
"attributes": {
"Field1": value_1,
"Field2": value_2
}
}
}
Not that I am aware of. The analysis is done at the datastore or map level so as long as you are pulling reference data to update feature data is will not matter where the reference data is from. I have updated many features at once using this method when they are all in the same geodatabase, but updating one of the reference features may be an issue if they are not in the same geodatabase.
You can certainly Copy the value of an intersecting feature using an Attribute Calculation Rule. Have a look at this ESRI Github Repo for examples.
// Calculation Rule
// Triggers: Insert
// create centroid
var cent = Centroid($feature)
// repeat this block for each intersecting feature class (change variable names!)
/////
var intersect_feature = First(Intersects(FeatureClassByName($map, "FeatureClass"), cent))
var value = null
if(intersect_feature != null) {
value = intersect_feature.Value
}
/////
// return the values
return {
"result": {
"attributes": {
"Field1": value_1,
"Field2": value_2
}
}
}
One more question. is there any restriction for drilldown operation, e.g. drilldown feature classes have to be in a same dataset that editing feature class is?
thanks......
Not that I am aware of. The analysis is done at the datastore or map level so as long as you are pulling reference data to update feature data is will not matter where the reference data is from. I have updated many features at once using this method when they are all in the same geodatabase, but updating one of the reference features may be an issue if they are not in the same geodatabase.
I meant from different database. we have our own database which we edit and we have a public browsing database we use as reference layers. we drilldown to feature classes in browsing database to update a new feature created in the editing database.
based on your reply we should be able to do the drilldown operation. we can't update browsing database anyway.
thanks.....