How do I get distinct values in a cascading filter?

brianmccargar
Giga Guru

I am trying to create a cascading filter for locations, started at State / Provence, then City, and finally location name. My issue is I get multiple values for the same State / Provence. Is there any way to get the State / Provence values to just show up once?

find_real_file.png

1 ACCEPTED SOLUTION

Filters are designed to work on tables with a unique value.  To get that to work as-is, you would need a custom filter. Alternatively, you could use the hierarchy to get the locations that are states (city is empty and state is not).  Then get the locations that match, then go to the next level in the cascade.

I'm not sure of a simple solution here.

View solution in original post

4 REPLIES 4

Adam Stout
ServiceNow Employee
ServiceNow Employee

Is this in sys_choice or on some fact table?

brianmccargar
Giga Guru

We are trying to use the Location [cmn_location] table directly.

 

Filters are designed to work on tables with a unique value.  To get that to work as-is, you would need a custom filter. Alternatively, you could use the hierarchy to get the locations that are states (city is empty and state is not).  Then get the locations that match, then go to the next level in the cascade.

I'm not sure of a simple solution here.

brianmccargar
Giga Guru

Thanks for that answer Adam, that helps clear up my understanding of how filters work.

I agree it does not sound like a simple solution.