Using muliple fields in a filter widget.

1097
3
Jump to solution
01-13-2021 02:25 PM
LucasRosen
New Contributor II

 

I am using the Filter Widget in a Mapping Application. I currently have two maps: one for the 2D Townships  (Subdivisions) and one for the 1D Township Boundaries (Exteriors). I am trying to allow the user to filter (called "Township Inquiry") by Township, Range, and Range Direction. It works for the Subdivisions but not for the Exteriors because the Exteriors cover more than one township (see images).    

LucasRosen_0-1610575884891.png

 

LucasRosen_1-1610575981533.png

 

 

I have another field that has the other half of the township, but the filter won't allow me to select both fields even though the value is the same. Is there a way I can do this?

Regards,

Luke R

 

Here are the Links.

Subdivisions: https://arcg.is/1PS54W0

 

Exteriors: https://arcg.is/PmOfe

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Take a look at the Group Filter widget.

As pictured below, add the same layer twice, using the two fields. Make sure you have the option Match any expression chosen. That way, any boundary that has, say, 15 in either field will meet the criteria.

Clicking the "Use Value" radio button will turn the unique values of that field into a dropdown list.

jCarlson_1-1610579526465.png

You can add additional groups to have similar filter groups to handle Township, etc. Unfortunately, adding multiple groups to the Group Filter widget doesn't look quite as nice as the regular Filter widget. And if you do add multiple groups, make sure that the option Append all expressions to existing map filter is chosen, otherwise you can only filter one group at a time.

Voila!

jCarlson_2-1610580264518.png

Our filter successfully picks up 109 / 110 with the selection of "110".

Hope you don't mind I opened a copy of your app to test my ideas.

- Josh Carlson
Kendall County GIS

View solution in original post

3 Replies
jcarlson
MVP Esteemed Contributor

Take a look at the Group Filter widget.

As pictured below, add the same layer twice, using the two fields. Make sure you have the option Match any expression chosen. That way, any boundary that has, say, 15 in either field will meet the criteria.

Clicking the "Use Value" radio button will turn the unique values of that field into a dropdown list.

jCarlson_1-1610579526465.png

You can add additional groups to have similar filter groups to handle Township, etc. Unfortunately, adding multiple groups to the Group Filter widget doesn't look quite as nice as the regular Filter widget. And if you do add multiple groups, make sure that the option Append all expressions to existing map filter is chosen, otherwise you can only filter one group at a time.

Voila!

jCarlson_2-1610580264518.png

Our filter successfully picks up 109 / 110 with the selection of "110".

Hope you don't mind I opened a copy of your app to test my ideas.

- Josh Carlson
Kendall County GIS
MarceloRosensaft
New Contributor III

Hello,

Do you know if I can use the group filter option that you mention in version 2.10 of the WAB developer edition with enterprise portal version 10.6?

The system doesn't allow me to turn on the option of "Append all expressions..."

Thanks,

Marcelo

0 Kudos
LucasRosen
New Contributor II

Hi,

The Group Filter worked well and I think that is what I will use. I am going to see if it can be a bit more user friendly.

 

Thanks,

 

Luke

0 Kudos