I have a feature table like this example (ArcGIS API for JavaScript Sandbox). What I did is a filter to the table with differents queries like date or strings, and they are working good!
If I search for a date interval the feature table refresh and show only the records that is between that dates. What I want now is that the records on map refresh too, but I can't do that... Someone can help me please?
Example:
I filter the table

Only one record with this query

But the map contains all records yet and didn't refresh

Code:
HTML
<input id="nud" type="text" data-dojo-type="dijit/form/TextBox" data-dojo-props="trim:true, intermediateChanges:true" class="dijit-form-TextBox filterTb" />
<button type="button" id="confirm">Filtrar</button>
Javascript
var confirmar = dom.byId("confirm");
on(confirmar, "click", function(value){
              var userVal = dijit.byId("nud").get('value');  
              var oidFld = myFeatureLayer.objectIdField;  
              var query = new Query();  
              lastWhere = query.where = "nud LIKE '%" +  userVal + "%'"; 
                
            myFeatureLayer.queryIds(query, lang.hitch(this, function(objectIds) {  
               myFeatureTable.selectedRowIds = objectIds;  
               myFeatureTable._showSelectedRecords(); 
               }));  
});     
Solved! Go to Solution.
André,
You can just take the lastWhere and apply it to the myFeatureLayer definition Expression:
myFeatureLayer.setDefinitionExpression(lastWhere);André,
You can just take the lastWhere and apply it to the myFeatureLayer definition Expression:
myFeatureLayer.setDefinitionExpression(lastWhere);Work like a charm! Thank you!
Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.
