Creating Category Selector Showing Two Fields

1873
5
02-25-2021 01:27 PM
JoshBillings
Occasional Contributor II

Hey all,

I want to create a Category Selector that shows two different fields in the layer. 

For instance, I want to be able to select a team from a Category Selector that has both Home Teams and Visitor Teams.

Any way that I can do this in the Dashboard or set my data up so that I can make this happen?

 

Thanks!

0 Kudos
5 Replies
jcarlson
MVP Esteemed Contributor

Any chance you could share an example of the data? What does a single row represent if it can have two different "Teams" attributes?

And also: no, you can't create a Category Selector on more than one field. There may be a way to set up your data to do this, but it depends a lot on what the data looks like, and how it's being used. No sense in getting the selector to work if it ruins the data or the other dashboard elements.

- Josh Carlson
Kendall County GIS
RudyProsser
Esri Contributor

I'm making a few assumptions based on your description. It appears you may have a Games dataset where each record represents a game and there are fields for Home and Visitor teams. You'd like to select a specific game by choosing the concatenation of Home and Visitor teams, for example, L.A. Rams @ Seattle Seahawks.  On your Category Selector, set the Categories From to Features, then in the Line Item Text construct the string you would like to appear in the selector, for example {Visitor} @ {Home}. Configure the rest of the properties as necessary. There's one drawback to this approach, your selector gets very long very quickly. Keeping to the NFL analogy, there are 16 games a week over a 16 week season resulting in a 256 game table. Your selector would then be 256 records long. A different approach is using two selectors, one for Home, the second for Vistor, and setup an actions so that selecting the Home team limits the away choices, or selecting the Visitor first limits the Home choices. In either case the maximum length of the select is 32, one for each team.

JoshBillings
Occasional Contributor II

Thanks for the replies. To clarify what I'm trying to do, I want to be able to select a team from a Category Selector and have it filter out every game that team plays in no matter if they are a home team or an away team.

Here is a snapshot of the dashboard that I have set up so far. As you can see, the team choices are only limited to the home teams (which are listed first) because I have set the Selector to Home Team.

JoshuaBillings_2-1614349307799.png

 

 

Additionally, here is a snapshot of my data as an Excel spreadsheet:

JoshuaBillings_1-1614349221827.png

 

I think what you are proposing @RudyProsser is what I will have to do. I will need to set up a Home Team selector and an Away Team selector. If one wants to see all games for their specific team, they will have to select their team name in the home and away selectors.

 

 

 

0 Kudos
SFM_TravisBott
Occasional Contributor III

Did you ever make progress on this? I am working on the same issue. 

maherelayyan2
New Contributor II

Did you ever make progress on this? I am working on the same issue

 

0 Kudos