Hello - Does anyone know how to get this to work:
The framework doesn't seem to honor this. I just have a simple query to select one feature by attribute then want to use that result as the spatial filter "Intersects' for a second layer. As in: Select a parcel by ID, then use that result as the spatial filter to return intersecting flood zone(s) . . .
So from what I can tell when setting up a spatial filter for a layer in the query widget:
For this choice:
Spatial filter>Filter by> Selected features from data source>Add filter layer>Added
The feature layer must come from another layer in another map from another page.
For this choice
Spatial filter>Filter by> Selected features from data source>Add filter layer>Outputs
The only valid sources appear to be the Output from a Geolocator source from the Search Widget. Selected records from a feature layer source in the Search Widget do not appear as a choice.
Hi @DavidColey, I think the first choice you mentioned will work. A filter layer actually can be the same layer that is consumed by the query item. Could you provide any more detailed information or a sample app? Thanks!
Hi @TianWen - well, that's the problem. This option:
Spatial filter>Filter by> Selected features from data source>Add filter layer>Added tab
doesn't seem to work. Nothing appears as selection set from my layers' attribute query to set as the filter for the spatial query. The only way I can see to get it to work is when the feature layer is pulled in from another map page in the ExB or an external source...
Ok thanks @TianWen I see. Ok. This is the desired work flow:
Using the Search widget, the user queries a parcel polygon via a Parcel ID from a feature layer source.
The returned record should be visible as an Output source for the Query tool, where that geometry is then used a a spatial filter for another layer, like Zoning:
As you can see, the Parcel Layer does not show up as an available output source. The 2 output sources that do appear are both Locator output sources.
I see the problem! Actually, Search widget will generate output data source only when it consumes geocode services. So it is as expected.
To achieve your intended goal, you can add the original Parcel layer as a filter layer in the Query. Then use a Filter widget configured with the same data. Apply filter conditions in the Filter widget, then the returned geometries are the candidates that can be used to conduct a spatial filter (select them all in your case).
Hmm, ok thanks @TianWen for looking at this. The Interaction from the help says as much:
"When configured with a locator source, the Search widget generates an output data source that can be used in other widgets. "
Although the help does not specifically say a layer source won't work, now we know. For my use case, I may just leave as is but thanks for the tip on the Filter Widget. I'll give it a try, re-publish and ping you . . .