Select to view content in your preferred language

Query widget with spatial filter on result of filter widget

229
2
09-03-2024 07:13 AM
Labels (1)
SaraHu
by
Emerging Contributor
I am creating an Experience with two layers: 
1. Regions (Polygons)
2. Streets (Lines)
 
The user should be able to choose one or more regions and query the streets by attributes and intersection (spatial filter) with the choosen regions. The region and streets layers do not have a common attribute.
 
I am using a query widget to query the streets (by attribute) with a spatial filter for regions. This works when I use the select widget to select the regions (by attribute). But I would prefer to use the filter widget to select the regions because it is much simpler and less error prone for the user.
 
- Is it possible to use the filter widget with the spatial filter of the query widget? Wasn't that possible with the Web AppBuilder? I couldn't get it to work, the query widget ignores my selection in the filter widget. How should I configure the triggers/actions?
- Alternatively, if the filter widget does not work: How can the look and feel of the selection widget be made simpler and more user-friendly? I mean, the filter should always be active, the region layer always selected and the drop-down list always visible?
- Or are there other alternatives?
Tags (2)
0 Kudos
2 Replies
Ke_Xu
by Esri Contributor
Esri Contributor

Hi SaraHu,

Select widget supports spatial query. Toggle on Attribute selection and then configure layer attribute. 

Ke_Xu_0-1726187971586.png

 

Thanks,

Ke

0 Kudos
SaraHu
by
Emerging Contributor

Hi Ke
Thanks for the hint.
I was able to select the region and street layers by attribute in a selection widget.
But how can I filter/select only the streets that are located in the selected regions (spatial intersection)? I have configured a spatial selection by region (selected features), but this has no effect.
Can I write the selected features (streets) in a (temporary) result layer (from the selection widget) like in the query widget? So that I can get the attributes of a feature in a pop-up? If the features are just selected, the selection disappears as soon as I click on a feature.

0 Kudos