Building a dynamically FeatureSetByName query

786
4
Jump to solution
08-03-2021 11:23 AM
Labels (1)
JS_Esri
Occasional Contributor
Hey folks, currently trying to dynamically build a FeatureSetByName query but am getting the notorious 9999999 error in ArcGIS Pro 2.6.6 for even a simple case. Does anyone know if this is possible or if I'm going about it the wrong way?
 
JS_Esri_0-1628014984466.jpeg
var s ="indxltm_region_ltm5000"
var x = FeatureSetByName($datastore, s , ["OBJECTID", "PLAN_NAME"], true)if (Count(x) > 0) {    return first(x).PLAN_NAME
}
0 Kudos
1 Solution

Accepted Solutions
HusseinNasser2
Esri Contributor

FeatureSetByName does not support dynamic class names. The name of the class has to be available during static analysis of the script so we can build out the relations in the catalog. (E.g. if you copy Class A which has an attribute rule that reads from Class B we also copy Class B too) 

 

View solution in original post

4 Replies
JohannesLindner
MVP Frequent Contributor

The expression seems to be OK, it worked for me in a Popup.

So either it doesn't work in an Attribute Rule (which I doubt) or it's not the expression that causes the error.


Have a great day!
Johannes
0 Kudos
JohannesLindner
MVP Frequent Contributor

Well... A few days later, I now need the same thing. Now I tested it in an Attribute Rule, turns out it doesn't work there.

@HusseinNasser2, any tips?


Have a great day!
Johannes
0 Kudos
JS_Esri
Occasional Contributor

Johannes, thanks for keeping a pulse on this. We still haven't found a solution either

JS

0 Kudos
HusseinNasser2
Esri Contributor

FeatureSetByName does not support dynamic class names. The name of the class has to be available during static analysis of the script so we can build out the relations in the catalog. (E.g. if you copy Class A which has an attribute rule that reads from Class B we also copy Class B too)