i want to filter student by there marks range between
poor student = 1-10 marks
medium student = 10-20 marks
bright student = 21-25 marks
my marks database field key is "marks"and table title " MARKS"
database name STD3EKAMKASOTI
export function dropdown6_change(event) { $w("#dataset1").setFilter(wixData.filter() .between("marks", $w("#dropdown6").value)); }
but it doesn't work so please help me to solve this
i have poor knowledge of code so explain it clearly please
![](https://static.wixstatic.com/media/a27d24_a3dd4579376e4f3082fe1e836088901c~mv2_d_3508_2480_s_4_2.jpg/v1/fill/w_980,h_693,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/a27d24_a3dd4579376e4f3082fe1e836088901c~mv2_d_3508_2480_s_4_2.jpg)
my site address
page name staff ekam kasoti result
Not sure I totally understand your request; does the following give you the correct results for Item1 filter:
$w("#dataset1").setFilter(wixData.filter() .between($w("#dropdown6").value, 1, 10));
?
Hi, Nani.
For some unknown reason, the Corvid/Wix duplicates some of the text (it would be great if someone from Corvid/Wix could fix that annoying bug); so if you see two/2 occurrences of "#dropdown6" in a row, then there should only be one/1 occurrence.
What does dropdown6 stand for? That will help us answer your question regarding start range and end range.
Hi, Nani.
Per https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#between, the between() method takes 3 arguments: propertyName, rangeStart and rangeEnd.
Here is the example they provide:
let newQuery = query.between("age", 25, 65);
Now compare that to your call:
.between("marks", $w("#dropdown6").value));
Note that you have the propertyName ["marks"] and you have the rangeStart [$w("#dropdown6").value)], but you are missing the rangeEnd value.
In addition, dropdown6 is most likely a Wix-supplied name; you may know what that stands for but most people won't; having generic names like that make code harder to read/understand/maintain. I encourage you to replace dropdown6 with a mnemonic (memory aiding) name. That will make the code easier to read/understand/grok/maintain.
There may be other issues as well but starting with the above should surely help.
but how set dropdown value between...meaning dropdown value 1-5 is value 1,2,3,4,5 or there is another way to set dropdown value between two numbers......can you explain
Have a read of the Wix API reference for .between() and .setFilter()
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFilter
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#between
If you have changed your dataset id name to... 'database name STD3EKAMKASOTI'
Then this needs to be the same in your code too.
Note the info for each function....
.between()
It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.