Filter widget -selecting multiples values

1367
10
Jump to solution
07-20-2021 08:58 AM
Labels (1)
JoseBarrios1
Occasional Contributor

Hello experience builder community,

Does anyone know if is possible to select multiple values on the experience builder filter widget? I know that it is possible in dashboard but I can't figure out how to do it in exp. builder. An example will be an user selecting multiple U.S. States and ethnic groups to filter a data table. Thanks for any suggestions!

JB

 

0 Kudos
1 Solution

Accepted Solutions
JoseBarrios1
Occasional Contributor

Well... I just figured it out! It is possible by just selecting "is any of" on the selecting sql statements.

Thanks,

 

JB

 

View solution in original post

10 Replies
JoseBarrios1
Occasional Contributor

Well... I just figured it out! It is possible by just selecting "is any of" on the selecting sql statements.

Thanks,

 

JB

 

JonathanMcDougall
Occasional Contributor III

There's perhaps a couple of ways, some smoother than others. @JoseBarrios1 

One approach; allow the user to select the state(s) through a filter with multiple clauses then have a card related to the ethnic group information.

I could put a quick example of what I mean together for you

0 Kudos
JonathanMcDougall
Occasional Contributor III

Sorry for this being rough - buy may give you ideas. Lists, filters, table, map and extents.

Re-published ExpB

0 Kudos
JoseBarrios1
Occasional Contributor

Hi Jonathan,

Thanks you for your suggestions. The problem is that I don't have a map associated with the table. The table contains a list of species and the requirement is for the user to select multiple States to see the list. I was able to use the widget filter (using the "is any of " sql statement). The only problem that I still have is the duplication of values due to many - many relationship on species-state. The other problem is that the filter affects ALL the other tables on the app. 

0 Kudos
JonathanMcDougall
Occasional Contributor III

@JoseBarrios1 

Hi

You may not have a list of species in the map, however, the common field in map, or list, and table is State, I assume.
This being the case, when you add the trigger, it will ask for this common field from the two datasets.
If you look at the link above, you will see I've put "states" into a list, from that list you can select multiple which will then populate the table from selected records. I've left the map there, but no map interaction is needed.
I'll add more records to make it a bit more obvious what's going on.

JonathanMcDougall
Occasional Contributor III

@JoseBarrios1 

I've republished for you, it's still rough but should work as an example.

Elements are as follows;
Map - shows nothing more than the selection from the list, I've not set any actions at all. This dataset is just a dataset of states, nothing more.
List - set to allow multiple selections of "states". It's got one action to select records of species to show in the table.
Table - the data is a table of "species" that was published with the "state" feature layer, so two datasets with the state as a common id. The table is set to show selected records.
Filter - speaks for itself.

Happy to give further info and screenshot to develop further.

0 Kudos
JoseBarrios1
Occasional Contributor

I clearly understand the workflow. Thank you so much! I created the list that allow me to select multiple States...that work great!. However, if I use this workflow,  I will have to duplicate the records many times for each state. I have 18 states with 2,099 species.  The result will be an extremely very large table with duplicate records and a very long list of species for the filter. I don't see anyway around to support this many- to-many relationship. 

0 Kudos
JonathanMcDougall
Occasional Contributor III

How's your species data held? Are you able to share a grab of a few lines? You wouldn't be creating duplicate records, just ensuring the right species has the right state - you're data would be no bigger than it is just now.

@JoseBarrios1 

0 Kudos
JoseBarrios1
Occasional Contributor

I am confuse... Attached is a small excel sample of the species table structure. The species occur in many states as shown in "State" field. sp_list.png

 

0 Kudos