Hey! When using FeatureTable, it does not updates its content after applying setDefinitionExtension to FeatureLayer referenced FeatureTable. Are you going to fix this bug in the next release?
Has this been addressed in subsequent releases? Some of the threads and the documentation for FeatureTable suggest we need to use a query on the underlying grid to filter the data. It makes more sense to me to set a definitionExpression on the underlying FeatureLayer. The variable filterValue is chosen from a filteringSelect.
updateTable: function (filterValue) {
app.testTable.setDefinitionExpression(("Dist_Code = '" + filterValue + "'");
}
In this example, app.testTable is defined as
app.testTable = new FeatureLayer (pathName+"/arcgis/rest/services/DHSS/EPHT_radonSchool/MapServer/2", {
id: "testTable",
outFields: ["*"]
});
I'm not sure if I need to also set the table to filterSelectedRecords(true). I'm not getting any errors displayed, but I'm not seeing the results I expected either. In my example, this featureLayer is just a table; it doesn't contain any graphic component to tie back to my map display.
I actually requested this enhancement a while ago. It's status is currently In Product Plan, but I don't know when they actually plan to implement this. For now you will have to work around the issue by destroying and recreating your feature table. (There are other threads on GeoNet that have example code demonstrating how to do this.)
#ENH-000094524 [Enhancement] Update Featuretable when the underlying Featurelayer's definition query changes
Open
Status: In Product Plan
Severity: Medium
Submitted: 2/28/2016
Product: ArcGIS API for JavaScript
Version: 3.16
Thanks for the update. I keep trying to use FeatureTable and end up going back to using a plain dGrid. I thought I might be able to manipulate the grid that the FeatureTable is based on, but it doesn't take long to be more trouble than it's worth. Maybe in some future release.