This is the code,note that in the video the numbers field in the database are actually text,cause dropdown won't take numbers so in order to use numbers you need to add a code that makes numbers a string,this is the code that works for me with the first two options import {wixData} from 'wix-data'; $w.onReady(function () { //TODO: write your page related code here... }); export function button1_click(event, $w) { $w("#dataset1").setFilter(wixData.filter() .contains("bathrooms", $w('#dropdown1').value) .contains("bedrooms", $w('#dropdown2').value)) .then((results) => { console.log("Dataset is now Filtered"); $w("#repeater1").data = results.items; }) .catch((err) => { console.log(err); }); $w("#repeater1").expand(); }
This worked for me. Thanks. The only problem now is that when I select an option in the Dropdown.. all the other options disappear and the only option to click is the current option that I’m viewing. How do you suggest that Overcome this problem?
hallo, i have a question , I didn't study programming and i need a code for the check box. when i click on the checkbox the gallery shows a photo but me and my friend tried to do everything to make it happen but it didn't work i don't know if it is from the database/ collection or from the code. if you can contact with me : Discord : Reksem king#4394 Gmail : reksem.king@gmail.com
import {wixData} from 'wix-data'; export function search_click(event,$w) { //this filters the dataset using one filter which pulls from productType column in my DB table $w("#dataset1").setFilter(wixData.filter() .contains("productType",$w('#dropdown1').value)) .then((results) => { console.log("dataset is now filtered!"); $w("#repeater1").data=results.item; }).catch((err) => { console.log(err); }); $w("#repeater1").expand(); }
Did you find a way to do it without using code? I'm like you, so lost! And can't find any videos to link database to dropdown menu, which sounds like much easier to me, but apparently not... If you have found the way, please let me know. Thanks ;)
Is there a way to create a set of drop down menus without using code? Example for me anyway: say a repeater for an index. the index is for a directory. I am having serious trouble trying to make my datasheet filter the results in my index? Any suggested videos that are not in the matrix?? i.e - not code implemented? its been 20 videos later and I keep watching code inputs at the end.
To solve the button problem.. You have to sent the function on Click action on the button. This thing it's not said in the tutorial, but I think it's essential, I've spent 5 hours to find what's the problem
@@woontianruen8518 1. Right click on the button and select 'View Properties'. (if you can't find 'View Properties', press F11 on the keyboard to go full screen, then right click and you'll be able to find it at the bottom) 2. In the properties window, under the 'Events' column, go to 'onClick' and click the '+' button beside it. 3. The code window will open with "export function button1_click_1(event) {" already printed. 4. Continue writing the code as shown in the video. 5. Make sure you add $w to the already printed function line i.e. turn this "export function button1_click_1(event) {" into "export function button1_click_1(event, $w) {" this.
@@aamir_xo I've tried the above but doesn't seem to work. As far as i can tell i have input the code correctly, but the search button doesn't seem to action it. My code is below: import {wixData} from 'wix-data'; export function button1_click1(event, $w) { $w("#dataset1").setFilter(wixData.filter() .ge("bathrooms", $w('#dropdown1').value) .ge("bedrooms", $w('#dropdown').value)) .then((results) => { console.log("Dataset is now Filtered"); $w("#listRepeater").data = results.items; }) .catch((err) => { console.log(err); }); $w("#listRepeater").expand(); }
@@Mattyg331 Hi, You can try making it such that the results change when you select something from the dropdown menu, rather than changing on clicking the button(since the button don't seem to work). That's how I did it, might not be exactly how you want it, but if it works... To do so, click 'View Properties' on the dropdown menu, and choose "onChange:" then write the same code under it. Also I didn't add "$w" on my site and it seems to work fine. import {wixData} from 'wix-data'; export function dropdown1_change(event) { $w("#dataset1").setFilter(wixData.filter() .ge("bathrooms", $w('#dropdown1').value) .ge("bedrooms", $w('#dropdown').value)) .then((results) => { console.log("Dataset is now Filtered"); $w("#listRepeater").data = results.items; }).catch((err) => { console.log(err); }); $w("#listRepeater").expand(); } Also, make sure you're using proper FieldKeys and button/dropdown IDs.
@@aamir_xo Amazing that seems to have done the trick. Do you then have to repeat the export function multiple times for each dropdown? It works for bedrooms but not for bathrooms. Also looking at doing "price from" and "price to" Thanks for your help!
Is there also an option when selected the certain filters, when not happy with these filters, to go back and search for "all" again. For example with the Property Type I selected "Villa" , But I want to go back to where I started (so everything with House, Apartment, Villa AND Land". Does someone have an idea?
**QUESTION** I have a WIX website I am building where I will have a particular DB where customers will come and Fill out a data form and submit their information to the database. I want this DATABASE to work so that when the Customer enters the DATA into the database THAT DATA IS NOT VISIBLE to ANYONE ELSE -- Just Me in the Admin section and the Customer who entered the correct information. I was wondering that If I add a Key Data in the Database that the Customer enters a PASSWORD they create so that at a later time if that Customer was to view their data they entered the only way they can retrieve it would be to ( in the SEARCH TOOL ) ENTER THE PASSWORD that they Entered AND their email and only then would their Data Show up. IS THAT POSSIBLE TO CREATE HERE WITHOUT A BUNCH OF SPECIAL CODE ??? DO I NEED TWO (2) search bars to require BOTH forms of Identity they enter to retrieve their data-set of information ???
Can you make a filter with province, district, neighborhood, categories? I want the cards suitable for filtering to be listed after the province, district, neighborhood categories are selected.
The bathrooms filter is not working for me,the elements from the dropdown simply won't react/filter through the numbers in the database,what setting you do in the database?and in the dropdown menu?
After I create the dropdown1, and did a preview, when the filter results show up, the search field text disappeared in dropdown 1. Can anyone help to fix it? Thanks
Hello everyone, if this isn't working for you, probably the button function has not been set. To do just that: 1. Right click on the button and select 'View Properties'. (if you can't find 'View Properties', press F11 on the keyboard to go full screen, then right click and you'll be able to find it at the bottom) 2. In the properties window, under the 'Events' column, go to 'onClick' and click the '+' button beside it. 3. The code window will open with "export function button1_click_1(event) {" already printed. 4. Continue writing the code as shown in the video. 5. Make sure you add $w to the already printed function line i.e. turn this "export function button1_click_1(event) {" into "export function button1_click_1(event, $w) {" this. Also, if you are confused about "#repeater1", you can add repeaters to your page. To do that click on "Add" button in the left side menu, and search "repeater".
Great, exactly what I was looking for. I'm going to try this. edit: it works, but when I add two number dropdown items to the code using parsefloat, both dropdowns have to be selected, before the repeater shows the results...
***QUESTION*** I am building a DATABASE where Individuals can enter data into the database so that at a later time they can retrieve that data. The trick is I want ONLY the person who enters THEIR DATA to be able to retrieve ONLY THEIR DATA from this DB. Could I have a data entry be a PASSWORD that the Customer Enters WHEN they first fill out the data form. THEN at a later time the only way they can RETRIEVE their data is by IN THE SEARCH TOOL ENTER their PASSWORD to retrieve their set of data they entered OR MAYBE their PASSWORD and their LAST NAME as the KEY to retrieve the data AND NO ONE ELSES DATA should appear. IS THIS POSSIBLE or will the search automatically pull up all similar PASSWORDS and NAMES ???
If I use same principle for new dropdowns and new filters in codes, will it work? I tried to add more dropdowns and use same principle in code (it doesnt show red dot-no errors), but doesnt work that new dropdowns. Can anyone explain how to add more dropdowns ? Thanks in advance
*QUESTION* - I keep getting Errors when you try and filter without the price, if you don't select anything on the price it will not find results. Once you select, no minimum and no maximum it will then search
Is there a way to filter based on tagging. I don't want to use a dropdown. I want all the words to be visible on the page, so the filter happens when a word is selected.
Can someone let me know what does he use to display the houses below the dropdowns. Like if its a shop or product gallery or anything else. Thanks in advance
Hi Tiaan, I followed your code exactly. Job well done! I did however come across an error. "TypeError: Cannot read property 'items' of undefined". Any advice to fix this? I was thinking it could be the type of list/grid I am using. Any help would be much appreciated!
@@turimessina2755 I solved by correcting my filter keys and making sure that they are all in the exact same format. Capital letters, spaces and so on.:)
Dear Dev i have used the below code however it is coming up with errors when i preview the page, please see the below code i used and then underneath that the errors that pop up, to be clear i am only filtering words not numbers, please help. please see below code i used. export function button14_click(event) { $w("@").setFilter(wixData.filter() .contains("type", $w('@').value) .contains("colour", $w('@').value) .contains("age", $w('@').value) .then((results) => { console.log("Data set is now filtered"); $w("@").data = results.iterms; }).catch((err) => { console.log(err); }); $w("@".expand(); } and below are the errors thar pop up on the preview page public/pages/eci5t.js: Unexpected token, expected , (22:3) 20 | }).catch((err) => { 21 | console.log(err); > 22 | }); | ^ 23 | $w("#repeater3".expand(); 24 | } please help it would be appreciated
The annoying thing is that the most important thing which is how the fillter drop down is created you never spoke about and you are just talking about price are you selling us the properties
Interesting IDEA HOWEVER this video is not very helpful to someone who is trying to learn. You kinda go through the information as if everyone knows what you are talking about but to a novice I MYSELF AM JUST LOST because you do not explain what you are doing YOU JUST SAY DO THIS AND THIS. I myself do not want to create a House Listing Search so different information and not sure what you are talking about has me just lost without explanations. :(
If you're looking for info on how to create some of the other elements of this tutorial, such as drop-downs or the property info (known as a repeater), here are some resources: DROPDOWNS - support.wix.com/en/article/adding-and-setting-up-a-dropdown-list REPEATERS - ruclips.net/video/_alvC9kPDNA/видео.html
Dear Dev i have used the below code however it is coming up with errors when i preview the page, please see the below code i used and then underneath that the errors that pop up, to be clear i am only filtering words not numbers, please help. please see below code i used. export function button14_click(event) { $w("@").setFilter(wixData.filter() .contains("type", $w('@').value) .contains("colour", $w('@').value) .contains("age", $w('@').value) .then((results) => { console.log("Data set is now filtered"); $w("@").data = results.iterms; }).catch((err) => { console.log(err); }); $w("@".expand(); } and below are the errors thar pop up on the preview page public/pages/eci5t.js: Unexpected token, expected , (22:3) 20 | }).catch((err) => { 21 | console.log(err); > 22 | }); | ^ 23 | $w("#repeater3".expand(); 24 | } please help it would be appreciated
the smart thing to do would be to give us the code in the comment or something ...
This is the code,note that in the video the numbers field in the database are actually text,cause dropdown won't take numbers so in order to use numbers you need to add a code that makes numbers a string,this is the code that works for me with the first two options
import {wixData} from 'wix-data';
$w.onReady(function () {
//TODO: write your page related code here...
});
export function button1_click(event, $w) {
$w("#dataset1").setFilter(wixData.filter()
.contains("bathrooms", $w('#dropdown1').value)
.contains("bedrooms", $w('#dropdown2').value))
.then((results) => {
console.log("Dataset is now Filtered");
$w("#repeater1").data = results.items;
})
.catch((err) => {
console.log(err);
});
$w("#repeater1").expand();
}
and the values in the dropdown has to be exactly the same as in the database
This worked for me. Thanks. The only problem now is that when I select an option in the Dropdown.. all the other options disappear and the only option to click is the current option that I’m viewing. How do you suggest that Overcome this problem?
hallo,
i have a question , I didn't study programming and i need a code for the check box. when i click on the checkbox the gallery shows a photo but me and my friend tried to do everything to make it happen but it didn't work i don't know if it is from the database/ collection or from the code. if you can contact with me :
Discord : Reksem king#4394
Gmail : reksem.king@gmail.com
Thank you so much. Finally managed to solve my problem of filtering multiple selection. Really appreciate it.
i used conditional filtering code for my drop-downs but i cant seem to get the search button to respond
Can you explain more on the "search" button added to this page. How it that configured?
I'm so lost! I just want one category drop down and link it to the dataset. Just can't figure out the code. Someone help?
import {wixData} from 'wix-data';
export function search_click(event,$w) {
//this filters the dataset using one filter which pulls from productType column in my DB table
$w("#dataset1").setFilter(wixData.filter()
.contains("productType",$w('#dropdown1').value))
.then((results) => {
console.log("dataset is now filtered!");
$w("#repeater1").data=results.item;
}).catch((err) => {
console.log(err);
});
$w("#repeater1").expand();
}
Did you find a way to do it without using code? I'm like you, so lost! And can't find any videos to link database to dropdown menu, which sounds like much easier to me, but apparently not... If you have found the way, please let me know. Thanks ;)
Is there a way to create a set of drop down menus without using code? Example for me anyway: say a repeater for an index. the index is for a directory. I am having serious trouble trying to make my datasheet filter the results in my index? Any suggested videos that are not in the matrix?? i.e - not code implemented? its been 20 videos later and I keep watching code inputs at the end.
it worked smoothly in editor X, thank you!
To solve the button problem.. You have to sent the function on Click action on the button. This thing it's not said in the tutorial, but I think it's essential, I've spent 5 hours to find what's the problem
Hi, can you explain more about this? I still can't solve it. Thanks
@@woontianruen8518
1. Right click on the button and select 'View Properties'. (if you can't find 'View Properties', press F11 on the keyboard to go full screen, then right click and you'll be able to find it at the bottom)
2. In the properties window, under the 'Events' column, go to 'onClick' and click the '+' button beside it.
3. The code window will open with "export function button1_click_1(event) {" already printed.
4. Continue writing the code as shown in the video.
5. Make sure you add $w to the already printed function line i.e. turn this "export function button1_click_1(event) {" into "export function button1_click_1(event, $w) {" this.
@@aamir_xo I've tried the above but doesn't seem to work. As far as i can tell i have input the code correctly, but the search button doesn't seem to action it. My code is below:
import {wixData} from 'wix-data';
export function button1_click1(event, $w) {
$w("#dataset1").setFilter(wixData.filter()
.ge("bathrooms", $w('#dropdown1').value)
.ge("bedrooms", $w('#dropdown').value))
.then((results) => {
console.log("Dataset is now Filtered");
$w("#listRepeater").data = results.items;
})
.catch((err) => {
console.log(err);
});
$w("#listRepeater").expand();
}
@@Mattyg331 Hi,
You can try making it such that the results change when you select something from the dropdown menu, rather than changing on clicking the button(since the button don't seem to work). That's how I did it, might not be exactly how you want it, but if it works...
To do so, click 'View Properties' on the dropdown menu, and choose "onChange:" then write the same code under it. Also I didn't add "$w" on my site and it seems to work fine.
import {wixData} from 'wix-data';
export function dropdown1_change(event) {
$w("#dataset1").setFilter(wixData.filter()
.ge("bathrooms", $w('#dropdown1').value)
.ge("bedrooms", $w('#dropdown').value))
.then((results) => {
console.log("Dataset is now Filtered");
$w("#listRepeater").data = results.items;
}).catch((err) => {
console.log(err);
});
$w("#listRepeater").expand();
}
Also, make sure you're using proper FieldKeys and button/dropdown IDs.
@@aamir_xo Amazing that seems to have done the trick. Do you then have to repeat the export function multiple times for each dropdown? It works for bedrooms but not for bathrooms.
Also looking at doing "price from" and "price to"
Thanks for your help!
Can you show us how you filled the property Type drop down ? what is the default value??
Hi how did you get the bedroom, toilet and for sale signs on your listings?
How did you insert icons into the product descriptions?
Hi Jess, did you ever figure this one out ?
How to add and setting up the button "search"?
Is there also an option when selected the certain filters, when not happy with these filters, to go back and search for "all" again. For example with the Property Type I selected "Villa" , But I want to go back to where I started (so everything with House, Apartment, Villa AND Land". Does someone have an idea?
Very good your video, but would be of much help if you post the code that you created! Thank you again!
**QUESTION** I have a WIX website I am building where I will have a particular DB where customers will come and Fill out a data form and submit their information to the database. I want this DATABASE to work so that when the Customer enters the DATA into the database THAT DATA IS NOT VISIBLE to ANYONE ELSE -- Just Me in the Admin section and the Customer who entered the correct information.
I was wondering that If I add a Key Data in the Database that the Customer enters a PASSWORD they create so that at a later time if that Customer was to view their data they entered the only way they can retrieve it would be to ( in the SEARCH TOOL ) ENTER THE PASSWORD that they Entered AND their email and only then would their Data Show up. IS THAT POSSIBLE TO CREATE HERE WITHOUT A BUNCH OF SPECIAL CODE ??? DO I NEED TWO (2) search bars to require BOTH forms of Identity they enter to retrieve their data-set of information ???
Can you make a filter with province, district, neighborhood, categories? I want the cards suitable for filtering to be listed after the province, district, neighborhood categories are selected.
Ugh! To much for me. Do you do side work? If so, how do I contact you?
The bathrooms filter is not working for me,the elements from the dropdown simply won't react/filter through the numbers in the database,what setting you do in the database?and in the dropdown menu?
After I create the dropdown1, and did a preview, when the filter results show up, the search field text disappeared in dropdown 1. Can anyone help to fix it? Thanks
Hello everyone, if this isn't working for you, probably the button function has not been set. To do just that:
1. Right click on the button and select 'View Properties'. (if you can't find 'View Properties', press F11 on the keyboard to go full screen, then right click and you'll be able to find it at the bottom)
2. In the properties window, under the 'Events' column, go to 'onClick' and click the '+' button beside it.
3. The code window will open with "export function button1_click_1(event) {" already printed.
4. Continue writing the code as shown in the video.
5. Make sure you add $w to the already printed function line i.e. turn this "export function button1_click_1(event) {" into "export function button1_click_1(event, $w) {" this.
Also, if you are confused about "#repeater1", you can add repeaters to your page. To do that click on "Add" button in the left side menu, and search "repeater".
My filter is coming up twice so there’s two for size and two for colour and then it won’t let me get a custom filter or delete the extra option
Great, exactly what I was looking for. I'm going to try this. edit: it works, but when I add two number dropdown items to the code using parsefloat, both dropdowns have to be selected, before the repeater shows the results...
***QUESTION***
I am building a DATABASE where Individuals can enter data into the database so that at a later time they can retrieve that data.
The trick is I want ONLY the person who enters THEIR DATA to be able to retrieve ONLY THEIR DATA from this DB.
Could I have a data entry be a PASSWORD that the Customer Enters WHEN they first fill out the data form.
THEN at a later time the only way they can RETRIEVE their data is by IN THE SEARCH TOOL ENTER their PASSWORD to retrieve their set of data they entered OR MAYBE their PASSWORD and their LAST NAME as the KEY to retrieve the data AND NO ONE ELSES DATA should appear.
IS THIS POSSIBLE or will the search automatically pull up all similar PASSWORDS and NAMES ???
If I use same principle for new dropdowns and new filters in codes, will it work?
I tried to add more dropdowns and use same principle in code (it doesnt show red dot-no errors), but doesnt work that new dropdowns. Can anyone explain how to add more dropdowns ? Thanks in advance
Anyone please help, I couldn't make the price filter to work. :(
The rest is working, except price filter.........
Thank you so much for this tutorial it was really helpful!
*QUESTION* - I keep getting Errors when you try and filter without the price, if you don't select anything on the price it will not find results. Once you select, no minimum and no maximum it will then search
This part of the code shows error on my end }); Can you assist?
Me too I don't how to repair it please help me...
@@maxbrt7409 did you find a solution?
did you find a solution to this problem?
@@sebwo8319no
did you add the first part, the one he said doesnt matter? I get the same error but dunno if that is the problem
Is there a way to filter based on tagging. I don't want to use a dropdown. I want all the words to be visible on the page, so the filter happens when a word is selected.
can anyone help me, why does it show export function button14_click? Where did the button come from?
Can someone let me know what does he use to display the houses below the dropdowns. Like if its a shop or product gallery or anything else. Thanks in advance
Repeater?
By the way the code work with but give the next error: TypeError: Cannot read properties of undefined (reading 'items')
Great video, It's what I'm looking for. Thank you so much
I don't know about the codes..how can I get over it.
whats that top code... box3 and all plz let me know
Hi Tiaan, I followed your code exactly. Job well done! I did however come across an error. "TypeError: Cannot read property 'items' of undefined". Any advice to fix this? I was thinking it could be the type of list/grid I am using. Any help would be much appreciated!
hey Brian , i got the same error how did ya solve it ?
i have the same problem!
any solution to this guys?
me too :(
@@turimessina2755 I solved by correcting my filter keys and making sure that they are all in the exact same format. Capital letters, spaces and so on.:)
Good video, man! Thanks.
can u tell me the name of the template?
Dear Dev i have used the below code however it is coming up with errors when i preview the page, please see the below code i used and then underneath that the errors that pop up, to be clear i am only filtering words not numbers, please help.
please see below code i used.
export function button14_click(event) {
$w("@").setFilter(wixData.filter()
.contains("type", $w('@').value)
.contains("colour", $w('@').value)
.contains("age", $w('@').value)
.then((results) => {
console.log("Data set is now filtered");
$w("@").data = results.iterms;
}).catch((err) => {
console.log(err);
});
$w("@".expand();
}
and below are the errors thar pop up on the preview page
public/pages/eci5t.js: Unexpected token, expected , (22:3)
20 | }).catch((err) => {
21 | console.log(err);
> 22 | });
| ^
23 | $w("#repeater3".expand();
24 | }
please help it would be appreciated
Can you send me the template please
Can you share the codes please?
thanks! super useful
How to filter results in a new tab? Anyone, please help?
how do you put a hover in a repeater??
you can't. you can only put things with the connect to data icon, which shows up when you hover your mouse over the element in the wix editor.
Good Morning/Afternoon, are you still in business need help with real estate website.
Take care
Ian
I can help, please DM me
Hi there, Could you undertake a small project? Thanks in advance.
I can yes please DM me
The annoying thing is that the most important thing which is how the fillter drop down is created you never spoke about and you are just talking about price are you selling us the properties
exactly...
those are normal dropdowns, the filter runs in the code depending on the dropdown selection
@@alemrivasr send your mail adress plz
Interesting IDEA HOWEVER this video is not very helpful to someone who is trying to learn. You kinda go through the information as if everyone knows what you are talking about but to a novice I MYSELF AM JUST LOST because you do not explain what you are doing YOU JUST SAY DO THIS AND THIS. I myself do not want to create a House Listing Search so different information and not sure what you are talking about has me just lost without explanations. :(
Where is the code? You didn't even show us the dataset for better understanding
Have spent hours trying to make this work. Nothing is happening when i click the search button... Any ideas?
facing the same issue , please do share if you have a fix
Thanks for that!
error
error
error
not functioning
If you're looking for info on how to create some of the other elements of this tutorial, such as drop-downs or the property info (known as a repeater), here are some resources: DROPDOWNS - support.wix.com/en/article/adding-and-setting-up-a-dropdown-list REPEATERS - ruclips.net/video/_alvC9kPDNA/видео.html
Fuck sake explain the dataset1 bit mate. Done everything and my page does nothing. Nothing spits to the console too.
nor work alreadyt
CONFUSEDDDDD
is it working for you?the whole thing seems to be missing a part,i dont know
No funciona el algoritmo...
Dear Dev i have used the below code however it is coming up with errors when i preview the page, please see the below code i used and then underneath that the errors that pop up, to be clear i am only filtering words not numbers, please help.
please see below code i used.
export function button14_click(event) {
$w("@").setFilter(wixData.filter()
.contains("type", $w('@').value)
.contains("colour", $w('@').value)
.contains("age", $w('@').value)
.then((results) => {
console.log("Data set is now filtered");
$w("@").data = results.iterms;
}).catch((err) => {
console.log(err);
});
$w("@".expand();
}
and below are the errors thar pop up on the preview page
public/pages/eci5t.js: Unexpected token, expected , (22:3)
20 | }).catch((err) => {
21 | console.log(err);
> 22 | });
| ^
23 | $w("#repeater3".expand();
24 | }
please help it would be appreciated
use this code.
import wixData from 'wix-data';
export function button26_click (event, $w) {
$w("#dataset1").setFilter(wixData.filter()
.contains ("typeOfArt", $w('#dropdown2').value)
.between("price",parseFloat($w('#dropdown1').value),parseFloat($w('#dropdown4').value)))
.then((results) => {
console.log("Dataset is now filtered");
$w("#repeater1").data = results.items;
}).catch((err) => {
console.log(err);
});
$w("#repeater1").expand();