Advance Filter

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)

  • 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 !

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

add you as contributor, thanx for helping in advance mate

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!)

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 )

$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

Any Help Please …

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.

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.

nop !!

will check it

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.

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