Σ Sigma Hosting is mainly a video tutorial website

Σ Sigma Hosting is mainly a video tutorial website that make it easier for you to search within the transcript of videos for solutions of problems you might face during your journey in dealing with different webhosting companies. So, we are very sorry if the text is not well organized and we may work on it in the future but for now we hope you get the benefit mainly from the video then you may need to have a look on the transcript. Thanks for your understanding 🙂

hi guys thanks for tuning in on today's how to we're going to show you give you a quick overview of week's data filters and and how to work with them the example or the website that we're going to use for this example is a property search website and we've got a few filters in the other one is property type the other one is bedrooms and then we've got a price range so they use a micron Research Forum so hundred thousand up to two hundred and fifty thousand and we're just going to show you how that works so did ask quickly just refresh this it looks like it didn't load properly just to give you an idea of run off there we go of the listings that we're going to research so here you can see I've got six listed properties all those different prices different bedrooms and so forth so what this is really about is when you're searching some fields believe in other fields blank they should still work so let's search for instance this one a price range up to five hundred thousand we leave all the other fields blank and I'm just to show you how that works so you can see that this is the only property listed under 300 thousand and it is listed probably as a house so let's put in the filter the apartment and you'll see that now it should show us no no those things they go back to your house it should show us the house as well now this property has two bedrooms so the moment we say two bedrooms a church still show see no change there and if we say price hundred thousand to five hundred thousand it's still within these parameters so it will work if we clear or take this price to a million we should now see quite a bit more properties available so we've got three properties that match our criteria so how does this work what are the tricks let's get into this real quick so just inside my editor I've got the property type which is basically text field I've got the bedrooms and importantly I've placed here in E and I've given the value of 0 1 is 1 2 is 2 and so forth but in E is the first option so if a guy selects an option and he wants to go back you'll see conflict on bedrooms because it's a blank for anybody if he does click on Amy actually still have a value of 0 so it will still show all the properties with with bedrooms of 0 and more which is what you want then a full price from and price 2 we actually did a similar thing and we created a price from and we've given it a value of 0 then for the price then other 100,000 the value is also a hundred thousand at label of 250 various 250 and then was priced too we did the same thing we can read a max value of say 100 million you know something that might be why are they considering that the type of filtering you're doing and then when the search button is clicked it should run these parameters and filter this data set that we've connected the repeater to so very important to know what we're actually filtering so I'm showing a max of this below 50 I only have 6 listings on here so it's not really relevant now but you'll see that this is connected to the property listings data set this repeater none of these dropdowns are connected to the data set you see they are click on them there is nothing and this in this connected data none of them are linked we simply create or use them to create the values that we want to search the data set worth so getting into the code this little bit here is what we should filter a focus on so you're going to import your week's data from week's data and then when the button is click detect we say dollar debuted and data set 1 dot set filter weeks data filter with these around 30 brackets now this is pretty standard stuff you'll get into the weeks in the rich API so there's nothing that you have to do they accept just update the data city or data sip now what is important is what we're going to do now so when we say contains it's a bit more flexible than using equals equals always looks for an exact match so when you're using equals this job done will always need to have a value whereas you use content it can be empty which is great so container works a bit better for this especially we need a bit of flexibility across your filters and then we've just simply selected our property type which is the database key let's just show you a way to find that it's very important that you use the correct advice you know if you've got a complex setup literally copy and paste them over as you need them to be exactly right otherwise it won't work for you for your search criteria so it's right at the end property type and click on manage properties and this field key this is the only ones you can see it's it doesn't have any spaces its create a camel key word so it's got this capital e to right in the middle where the words actually split this is a key that you would want to use right yeah so you can see that is exactly the same same with bedrooms the same as price so make sure your field keys are correct and we've got no so many times where you spell the word of the capital a ten and the key is with lowercase and so forth so very very important thing to make sure you get that right okay so back to the property type what this simply is is we're going to filter that property tab with the drop down to value so this one is drop down one dot value now for my bedrooms before property listings website it makes logical sense that a guy would want to see something with the selected bedrooms that he selected or more bedrooms so I've waited for for GE which is greater N equals to the value of this drop-down so greater than equals our database field and drop down to his value which as we've shown earlier because even if you select any has a value of 0 1 2 3 4 5 so it could always show an equal match or a greater value than the count 1 and then importantly price so we say dot between price and my price value is number value if I remember correctly in the database so let's just quickly make sure of that because it is also something that kept us busy figuring out so you can see there that it's fuel type is a number it's not text and why is that important well because you can't really create a range with text if you try to search number so we said dot between the field key is price and then importantly we said pause flight job times we'd add value and pause flow to drop down for dot value now why pause like what is past flight it converts it takes to a number so the value that we're going to get from this drop down is a text value and we want that value to be a number value by the time we search in it so even though this is any numbers it still gets formatted as ticks so st. Pauls flights we convert this dropdowns by the in turn number value and dropdowns falls falls by the internal value as well so you can see they drop down for docked on Thursday and that's top down through the price from in the price to and then we simply say duckling results we console dot log the filter and then we give the repeater the results in fact when using a repeater or a data filter like this we don't even need to give the repeat results the filter automatically updated with with the new weeks functionality so that is very simply how you build a filter and it's just give it one last overview of how it works let's give this page a refresh so you can see all the listings okay so you can see that we've got six listings let's look for listings between 500,000 and and million in price okay so these listings all match the criteria they are all between 500,000 and a million now if we're going to look for something with only four bedrooms or more we should probably see this one pop up so it's just a filter of the bedrooms and say search and there we go only this property is showing now so any property with four bedrooms and the prices length for now try and say I want land oh that won't work in Villa and we search those properties shoot high because it is classified as a house if I remember correctly guys that's as simple as that thanks for tuning in choose what's very fine .

Video Discription

A quick how-to on WiX Data filters

 

Leave a Reply