# Advance Filter

**URL:** <https://forum.wixstudio.com/t/advance-filter/37335>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [October 17, 2017, 5:04am UTC](https://forum.wixstudio.com/t/advance-filter/37335 "2017-10-17T05:04:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![3shtar](https://avatars.discourse-cdn.com/v4/letter/3/9de053/32.png) [@3shtar](https://forum.wixstudio.com/u/3shtar)\
**Post date:** [October 17, 2017, 5:04am UTC](https://forum.wixstudio.com/t/advance-filter/37335/1 "2017-10-17T05:04:40Z")

</div>

hello,

well i am trying to achieve the following but i need some help if possible please;

- i had connected my dataset list to a dropdown selection, Thus it shows all in the list. BUT i am looking to show only unique values (as you can see from attached image below, it shows Muscat, Salalah, Muscat) but i want to show only (Muscat, Salalah)

 ![](https://us1.discourse-cdn.com/wix/original/3X/9/1/916f7690776485cc4c63f2fd02a9eed0e46a1214.png)

- As you can see from above the advance search has different category to select, thus i would like to filter for different values, the QUESTION how to filter on available input. E.g let say the user selected the category and experience only, then the filter should take only what user selected.

- i want to filter experience with minimum so if the user input 5 in experience then the filter should find 5 and above .

- i want to make search by two type (gallery and list), so i had put slideshow[0] to gallery (connected search button to gallery) and slideshow[1] to list (connected search button to table), BUT when filter nothing happen to gallery!

any help please !

---

<div class="post-metadata">

**Author:** ![andreas-kviby](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/andreas-kviby/32/790_2.png) [@andreas-kviby](https://forum.wixstudio.com/u/andreas-kviby)\
**Post date:** [October 17, 2017, 7:26am UTC](https://forum.wixstudio.com/t/advance-filter/37335/2 "2017-10-17T07:26:21Z")

</div>

write and give me access to site and I will check, hej@wixsweden.se

---

<div class="post-metadata">

**Author:** ![3shtar](https://avatars.discourse-cdn.com/v4/letter/3/9de053/32.png) [@3shtar](https://forum.wixstudio.com/u/3shtar)\
**Post date:** [October 17, 2017, 7:47pm UTC](https://forum.wixstudio.com/t/advance-filter/37335/3 "2017-10-17T19:47:02Z")

</div>

add you as contributor, thanx for helping in advance mate

---

<div class="post-metadata">

**Author:** ![3shtar](https://avatars.discourse-cdn.com/v4/letter/3/9de053/32.png) [@3shtar](https://forum.wixstudio.com/u/3shtar)\
**Post date:** [October 21, 2017, 12:31pm UTC](https://forum.wixstudio.com/t/advance-filter/37335/4 "2017-10-21T12:31:48Z")

</div>

Hello,  
well as i am still looking for assistance, i had found that even the slide show does not work, and when looking to add map search as well i had add in dynamic page the map connection and yeah … it does not work as well…  
guess i am really bad in this :S

anyway for advance search this is my code + slideshow (both not working!)

```javascript
import wixData from 'wix-data';
$w.onReady(function () {

});
export function ListViewButton_click(event) {
	$w("#fullWidthSlides1").changeSlide(1);
}
export function GalViewButton_click(event) {
	$w("#fullWidthSlides1").changeSlide(0);
}
export function SubmitFiltterButton_click(event) {
		//Add your code for this event here: 
		let LocationSet = $w("#LocationSel").value;
		let CatSet = $w("#CatSel").value;
		let ExpSet = $w("#EXPinput").value;
		let LangSet = $w("#LangSel").value;
		let NationSet = $w("#NatioSel").value;
		let nextSearch;
		$w('#LawyersDataEng').setFilter(wixData.filter()
				     .hasSome('lawyerLocation', LocationSet)
				     .hasSome('lawyerMainCat', CatSet)
				     .hasSome('lawyerLang', LangSet)
				     .hasSome('lawyerCountries', NationSet)
				     .gt('Exp', ExpSet)
				     .limit(10) //i want to make 10 as limit in one page then i change to dropdown selection {10,15,20,50}
				     .find()
				     .then((results) => {console.log(results.items);
   							 nextSearch = results; 
   							 });
							//dont know how to send search data to them$w("#gallerySearch")&&$w("#tableSearch"))
	}

```

|| please note that i am using .hassome, but i might be wrong  
i am looking for adding  
if( non of search selection is filled ) then {show all}  
else (if one search selection is filled ) then { filter per filled selection}

* * *

for the map (in dynamic page )

```javascript
$w.onReady(function () {
	//TODO: write your page related code here...
	    $w("#dynamicDataset").onReady( () => {
        let currentItem = $w("#dynamicDataset").getCurrentItem();
            $w("#googleMaps1").location = {
             "latitude": currentItem.latitudeFieldKey,
             "longitude": currentItem.longitudeFieldKey, 
             "title": currentItem.descriptionFieldKey
        };
    } );

```

also i am looking to make a page where i will have a google map listed all my data location in one place so when a pin or description “title” is pressed i go to selected dynamic page  
any help  
thank you in advance

---

<div class="post-metadata">

**Author:** ![3shtar](https://avatars.discourse-cdn.com/v4/letter/3/9de053/32.png) [@3shtar](https://forum.wixstudio.com/u/3shtar)\
**Post date:** [November 20, 2017, 1:11pm UTC](https://forum.wixstudio.com/t/advance-filter/37335/5 "2017-11-20T13:11:45Z")

</div>

Any Help Please …

---

<div class="post-metadata">

**Author:** ![jkurian](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jkurian](https://forum.wixstudio.com/u/jkurian)\
**Post date:** [October 2, 2018, 10:09pm UTC](https://forum.wixstudio.com/t/advance-filter/37335/6 "2018-10-02T22:09:21Z")

</div>

Did you get the answer for how to get the unique field values from the table. I also in need of it to show the unique fields values (not the index field) in a dynamic page.

---

<div class="post-metadata">

**Author:** ![stcroppe](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/stcroppe/32/4559_2.png) [@stcroppe](https://forum.wixstudio.com/u/stcroppe)\
**Post date:** [October 2, 2018, 11:17pm UTC](https://forum.wixstudio.com/t/advance-filter/37335/7 "2018-10-02T23:17:02Z")

</div>

I think the easiest way to get a unique list is to load all of the data in the data collection column you need into an array.

Then follow this stack overflow post on sort unique in javascript.

> <https://stackoverflow.com/questions/4833651/javascript-array-sort-and-unique>

---

<div class="post-metadata">

**Author:** ![3shtar](https://avatars.discourse-cdn.com/v4/letter/3/9de053/32.png) [@3shtar](https://forum.wixstudio.com/u/3shtar)\
**Post date:** [October 3, 2018, 7:37am UTC](https://forum.wixstudio.com/t/advance-filter/37335/8 "2018-10-03T07:37:49Z")

</div>

nop !!

---

<div class="post-metadata">

**Author:** ![3shtar](https://avatars.discourse-cdn.com/v4/letter/3/9de053/32.png) [@3shtar](https://forum.wixstudio.com/u/3shtar)\
**Post date:** [October 3, 2018, 7:38am UTC](https://forum.wixstudio.com/t/advance-filter/37335/9 "2018-10-03T07:38:32Z")

</div>

will check it

---

<div class="post-metadata">

**Author:** ![stcroppe](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/stcroppe/32/4559_2.png) [@stcroppe](https://forum.wixstudio.com/u/stcroppe)\
**Post date:** [October 4, 2018, 8:00pm UTC](https://forum.wixstudio.com/t/advance-filter/37335/10 "2018-10-04T20:00:01Z")

</div>

I have mocked up a page that extracts data from a data collection, filters it for uniqueness and sorts it before adding it to a dropDown.

Hopefully this will help you out.

> **[WIX - DropDown Unique Values](https://stcroppe.wixsite.com/steveonsoftware/example-code/wix-drop-down-unique-values)**
>
> Show how to create drop downs with unique values from table data that contains duplicates in a column

---

<div class="post-metadata">

**Author:** ![3shtar](https://avatars.discourse-cdn.com/v4/letter/3/9de053/32.png) [@3shtar](https://forum.wixstudio.com/u/3shtar)\
**Post date:** [October 5, 2018, 5:21am UTC](https://forum.wixstudio.com/t/advance-filter/37335/11 "2018-10-05T05:21:48Z")

</div>

your site is very helpful … good job  
Thank you very much for your help
