Select to view content in your preferred language

How to set up category selector based on finding a word in an attribute field?

512
5
07-09-2024 06:45 AM
JonJones1
Frequent Contributor

Hi everyone,

I'm working on an ArcGIS Dashboard and need some assistance with setting up a filter in a category selector. Specifically, I want to filter points on a map based on whether a field contains a certain word. Here's the scenario:

I have a dataset of sites, and one of the fields, OwnershipStatus, contains various text values like "Fully Owned", "Halfway Owned", and "Partially Owned", but sometimes contains values like "Others" and "Pending". I want to create a category selector that allows users to filter the map to show only those points where the OwnershipStatus field contains the word "Owned".

I've tried a few different approaches but haven't been successful. Here’s what I’ve done so far:

Category Selector Setup:

  • Added a category selector to the dashboard.
  • Set Categories from to Features.
  • Selected the layer and the OwnershipStatus field.

Filter Configuration:

  • Tried to configure a filter condition that checks if the OwnershipStatus field contains the word "Owned", but there doesn't seem to be a straightforward way to do this directly in the category selector.

 

Just wondering is it possible to set up a "contains" filter like this in an Arcgis dashboard category selector? 

0 Kudos
5 Replies
Tiff
by
Frequent Contributor

You should be able to do this using the "Operator" section in the category selector (within the Selector tab). You would likely have to override the categories below that to specify "Owned" as an option.

Tiff_0-1720533328195.png

 

0 Kudos
JonJones1
Frequent Contributor

Hey! When I choose "Operator," nothing appears for me to enter my desired text. Please see how I have it set up. Also, "jv" is actually the field that contains my keyword of interest.  Any thoughts? 1.png2.png

0 Kudos
jcarlson
MVP Esteemed Contributor

Are you on AGOL or Portal?

The "contains" operator on selectors was a more recent introduction, so Portal may not have access to it. There are workarounds using a Data Expression, though.

- Josh Carlson
Kendall County GIS
0 Kudos
JonJones1
Frequent Contributor

Hey there! Thanks for always being willing to help guys like me out; you are the real MVP. I am in AGOL; please see my reply above to the user "Tiff." It might give a little more info. I like that person's idea, but I can't get the operator selection to expand so I can write in my desired word. Thoughts? Any other ideas? 

0 Kudos
Tiff
by
Frequent Contributor

Where it says "No override defined", you should be able to "Load categories" first to see what comes up (should be all the values) and then you can Override it and put "Owner" as an option.

0 Kudos