So I watched Nayelli’s video about how to do a search with a table (the cakeshop website) and was able to do that. You can see it here:
It is a dictionary. However, I have two problems:
(1) If I search a word like “test”, the results that come up are not only those that say “test”, which is what I want, but also those that say “intestine”, “testify”, etc. How do I limit my search so that only entire words are found and not any part of the word?
(2) I want to sort my results accord to the “Greek gloss” column. However, everything I try does not sort them. I try sorting the database, I try adding a sort function to the dataset on the particular page. Unfortunately, nothing is working to sort the results. How do I do this?
Here is my current code on the page:
import wixData from ‘wix-data’;
//For full API documentation, including code examples visit Velo API Reference - Wix.com
$w.onReady( function () {
//TODO: import wixData from ‘wix-data’;
});
export function searchButton_onClick(event) {
wixData.query(‘koine-lexicon’)
.contains(‘englishGloss’, $w(‘#input1’).value)
.find()
.then(res => {
$w(‘#table1’).rows = res.items;
});
}