I followed the instructions explicitly, step by step and walked through the code numerous times, yet I’m still not getting the results as explained in this tutorial.
Is there anyone that I can give access to the editor portal of my site to verify that I set up everything correctly?
Hi Colin,
You can also check out the example here regarding filtering the table data using multiple user inputs.
Note that the words in Hebrew are not related to the logic of the code.
Want to thank everyone for the advice and code samples. I tried a few and still no success. Could everyone give it one more look over to see where I could have gone wrong? – Thank you so much!
An integer will be passed from a previous page and assigned to the variable: PrevPageVar
The data stored in this variable will be compared to the data stored in a field called “Lessonid” (column) in the “Lessons” database.
The code should filter so only records (rows) with the specified integer will appear in my text box named, “StoryBox”.
I actually see how there could be potential problems with the code, but I’m not too sure how to connect it all up.
Ok, been working on this for the most part of today. I was able to get it to work as long as I’m querying a database field that is set to text. But, when I query a database field that is number, it doesn’t work. Here is the code that worked.: (Query database text field ‘correctAnswer’.
(Works)
export function runfilter_onclick() {
console.log (“filtering”);
$w(“#LessonsDS”).setFilter(wixData.filter().contains(‘correctAnswer’, ‘B’));
}
But, ‘lessonid’ is a number field and nothing happens.
Excellent suggestion! – I gave it a try, with and with out quotation marks, neither way had any affect. Anyone else have any ideas why the code might run perfectly to query from database text fields, but not from numeric (int) fields? ( I change lessonid to a field that is text and it runs perfect) – Thanks