Is it possible to query server-side FeatureTable without re-creating FeatureLayer?
I got a solution:
1. Create FeatureLayer:
let featureLayer= new FeatureLayer({
After FeatureTable with FeatureLayer is created,
call
The question was how to do it without definitionExpression. So marking your solution as the correct one, by using definitionExpression, is a bit miss leading for those searching for the same thing in the future.
@MatthewDriscoll
function handleQueryResults() { let queryBP = bldPermLayer.createQuery(); queryBP.where = "query" queryBP.outFields = ["*"]; // do the query bldPermLayer .queryFeatures(queryBP) .then((response) => { // code }); }
The response is FeatureSet, right? How to update FeatureTable using the response? Or FeatureTable got updated already?
Thanks.
Forrest
What do you mean? Are trying to edit a FeatureTable through a query?
Thank you for your help!
Is it possible that FeatureTable get updated automatically when querying FeatureLayer?
You can bring it in as a FeatureLayer and query it the same as you would as a feature layer.
const bldPermLayer = new FeatureLayer({ url: "https://.../server/rest/services/...", outFields:["*"] }); const featureTable = new FeatureTable({ view: theView, layer: bldPermLayer, }); function handleQueryResults() { let queryBP = bldPermLayer.createQuery(); queryBP.where = "query" queryBP.outFields = ["*"]; // do the query bldPermLayer .queryFeatures(queryBP) .then((response) => { // code }); }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.