Experience Builder - Unique values in List

4888
9
06-30-2020 10:12 AM
AdamShutz
Occasional Contributor

Hi, 

I am building an application through experience builder and want the user to navigate through a few options to bring themselves to a filtered map page. 

I am having trouble manipulating the data in the List. 

What i want to see is a unique or distinct set of variables from the list. 

I then want to use that result to filter the next list (which works fine), but the repeated values are cuasing an issue. 

Thanks for any help

0 Kudos
9 Replies
ShengdiZhang
Esri Regular Contributor

Hi Adam,

I cannot reproduce this issue. Here are my steps, please tell me if there is anything wrong:

1. Create 2 list widgets using the same data source

2. For List 1: enable Tool Filter, and set the filter with a clause or a clause set to show distinct set of variables

3. In live view or preview, click the filter button on List 1

With above steps, List 2 also get filtered, but I cannot see the repeated values.

Could you please add more details on how to reproduce this issue? Thank you.

Shengdi

0 Kudos
AdamShutz
Occasional Contributor

Hi Shengdi, 

Thank you for your response. 

Step 2 in your example seems unfamilar. I cant see where to make the List 1 a distict set of variables. 

Thank you 

Adam

0 Kudos
ShengdiZhang
Esri Regular Contributor

Hope this can answer your question.

AdamShutz
Occasional Contributor

Hi Shengdi, 

This doesnt seem to be creating a unique list. 

It is filtering on the country and population counts. 

Using your data, I have a List one with the countries in, and a list 2 with the cities. 

List 1 has duplicate countries, as there are multiple cities in each country. 

But ideally I would like a unique list 1 to only have one of each country. 

Thanks for your response, appreciate the help. 

Adam

0 Kudos
ShengdiZhang
Esri Regular Contributor

Hi Adam,

What you want to do cannot be done using just one data source.

Here is a solution you can try, taking country - city data as example:

1. Create a data source 1 with unique country name in it; Create another data source 2 with country - city (its corresponding relationship) in it

2. List 1 use data source 1 and List 2 use data source 2

3. Add a trigger in List 1

   a. For Action, select "Filter Data Records"

   b. For Action data, select data souce 2

   c. For Conditions, enable "Trigger / action connection", and select "Country" for trigger and anction fields

And the action setting will look like this:

If you are familiar with database, this works very similar to foreign key.

This is how it works:

Shengdi

AdamShutz
Occasional Contributor

Hi Shengdi, 

Thansk for the response. 

This is exactly how I worked around this. 

Was hoping there was a way to get create it with just one datasource, but if it cant be done thats fine. 

Thank you 

Adam

nabaz-gharib
Frequent Contributor

Hi,

 

You mentioned:

1. Create a data source 1 with unique country name in it; Create another data source 2 with country - city (its corresponding relationship) in it

could you please explain how to create a datasource like that from AEB?
I have a table contains team names, I want to create a list of distinct team names, but I cannot find out how to do it. I use the team's name to filter the map.

0 Kudos
ShengdiZhang
Esri Regular Contributor

Hi, you can filter the unique values in Excel and then upload the unique values to a newly created feature table.

Please see https://support.microsoft.com/en-us/office/filter-for-unique-values-or-remove-duplicate-values-ccf66...

 

0 Kudos
nabaz-gharib
Frequent Contributor

Okey thanks,
I was thinking doing it right way in the Experience Builder.

0 Kudos