Filter Widget using a Group Layer

828
9
Jump to solution
05-09-2022 08:01 AM
BradThompson1
New Contributor II

Is possible to have a Filter widget query a map service that is a Group Layer?  The Group Layer consists of 2 layers, a point layer and a line layer.  Both layers would have the same field name and values that would be used to query on.  I would like the filter result to display all records that match the value in both the point and line layers.  @jcarlson 

Tags (2)
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Oh, I know it can! You have to add either a header bar or a side bar element first, and then add a "Category Selector" to it. You can either manually define the categories, or else used the distinct values from a layer to auto-populate the categories.

Once you have that, you just add Actions to filter your layers by the matching field.

- Josh Carlson
Kendall County GIS

View solution in original post

9 Replies
jcarlson
MVP Esteemed Contributor

Are we talking about Web App Builder, or Experience Builder? Or something else?

- Josh Carlson
Kendall County GIS
0 Kudos
BradThompson1
New Contributor II

Thanks for responding Josh.  As of right now, the application is being built in Experience builder.

0 Kudos
BradThompson1
New Contributor II

I work for the RTA in Chicago.  I want to filter a point layer and a line layer by CTA, Metra or Pace.  The points and lines are Capital project locations.  I prefer not to have 2 filters.

0 Kudos
jcarlson
MVP Esteemed Contributor

Hm. As far as I know, there's no "group filter" widget in EB like there is in WAB. Are you filtering by multiple attributes?

Are there specific functions that require the use of EB? A Dashboard could handle this kind of thing quite easily.

- Josh Carlson
Kendall County GIS
0 Kudos
BradThompson1
New Contributor II

Each layer (point and line) has a field named AGENCY with the values "CTA", "Metra" and "Pace".  I'd like 1 filter that looks in each layer's AGENCY field and returns either CTA, Meta or Pace from both. 

I'll need to confirm why specifically we are using EB for this application.  To confirm though, there is a Filter widget for group layers in WAB?  Is there a specific name for it?

Lastly, are you thinking an Operations Dashboard for this application?

0 Kudos
jcarlson
MVP Esteemed Contributor

Yes, WAB has the "Group Filter" widget, that is its name. We only have a few WAB apps left, but I use the Group Filter widget for this kind of thing, like when I have half a dozen layers and I want to filter them all based on their "created_date" or something.

And yes, I was thinking that if there weren't an EB / WAB specific function needed, like editing or something, a Dashboard has a lot of nice capabilities for interacting with data. Having a button bar at the top/side of the screen with the different agencies would be very very simple to set up.

- Josh Carlson
Kendall County GIS
0 Kudos
BradThompson1
New Contributor II

The dashboard idea sounds promising.  So you think a dashboard can be configured to have a button bar somewhere with 3 buttons (CTA, Metra, and Pace).  Once a user selects an agency, say "Metra", it would return results from the 2 layers (point and line) for Metra?  (Thanks again!)

0 Kudos
jcarlson
MVP Esteemed Contributor

Oh, I know it can! You have to add either a header bar or a side bar element first, and then add a "Category Selector" to it. You can either manually define the categories, or else used the distinct values from a layer to auto-populate the categories.

Once you have that, you just add Actions to filter your layers by the matching field.

- Josh Carlson
Kendall County GIS
BradThompson1
New Contributor II

Thanks!!  I have a meeting at 1:00 p.m. to review with staff.  Thanks so far.  I really appreciate it.

0 Kudos