Select to view content in your preferred language

Predefine unique values in filter widget

385
4
02-09-2024 01:10 PM
Labels (2)
ClaireMcHenry2
New Contributor II

I have a large list of documents as data in a WebMap within my Experience Builder application. A field for these data is an 'author' attribute. Some documents have one author, some have multiple authors, and some have "one author, et al."

I need to create a filter where the filter is "Author contains ________" and a list of all possible authors show up using the predefined unique values expression. However, there are 89 unique authors so entering this manually would be exhausting. Is there a way to edit the expression by typing or is using the SQL Expression Builder the only way to fix this.

 

Note: Having "Author is_______" without the predefined values is not an option since sometimes an individual will want to select an author that is listed as an author on a document with more than one author. It's an issue of one to many. 

Thanks for the help. 

0 Kudos
4 Replies
HonghongLi
Esri Contributor

Hi, what about using "Author is any of selected", and choosing multiple for the source type, see my screenshot:

HonghongLi_1-1707514438281.png

 

By using this configuration, users will be able to choose all unique values from the "author" field, users can choose either containing only one author value, two author values, or multiple author values. 

HonghongLi_2-1707514610178.png

Is this what you are looking for?

 

0 Kudos
ClaireMcHenry2
New Contributor II

Unfortunately, I can't use this setting since I have multiple authors listed for some attributes that also exist as an author for a different attribute. See screenshot below. 

What I'm hoping for is for all authors to be listed individually so that the user can select an author and all data that has that author listed will show up. 

ClaireMcHenry2_0-1707755628501.png

 

0 Kudos
TonghuiMing
Esri Regular Contributor

Hi @ClaireMcHenry2 

This is quite an interesting case. I am afraid that the current OOTB features might be a bit difficult for you to achieve the goals, unfortunately. We will keep a note of your case and see if we can enhance it later, and in the meantime, you might want to check if a custom developed widget could do the trick.

Thanks for bringing it up.

0 Kudos
AnthonyJonesRSK
Occasional Contributor II

Hi Tonghui,

I have the same need, i.e. the ability to use unique values to filter using the contains parameter. Even small predefined lists are problematic as they would need to be manually updated every time a new category was added to your layer. If the contains parameter could utilise unique values it would be a big benefit and would solve some of the current issues with filtering in Experience Builder.

As an example we have an office location layer and related to this is a business unit layer, which records each business unit in our offices. We would like to be able to filter our offices by business unit but at present this appears to be very tricky. We cannot filter the offices by relationship and as far as I can tell the only way to record which business units are in each office in the office layer is to have comma separated lists in a single field. We can then use the contains filter parameter against this field but without the unique values option in the filter we would need to create predefined values and then add a new business unit every time a new one is added to the system. 

If this option is something that could be added to the filter widget in a future update it would be very much appreciated.

Thanks

Anthony

0 Kudos