Cant show database search results on my List/Grids :

Hi,
I was successful to connect my list/grid to the Database ,but I can not pass the search result values to the grids:
Here is my Grid Code:

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 button2_onClick(event){
wixData.query(‘DonorReport’)
// Query the collection for any items whose “Donor” field contains
// the value the user entered in the input element
.contains(‘Donor’, $w(‘#input3’).value)
.find() // Run the query
.then(res => {
// Set the Grid table data to be the results of the query
$w(‘#repeater1’).forItems( “button1”, ($w, itemData, index)= res.items;
} ); ///???
}

I have problem in the Bolded Area, my Text Box doesnt pass the values to grid for search result!

I needed the same thing and followed this video tutorial by Wix team found HERE: Wix Code | How to Create a Search for Your Database - YouTube

I could copy and paste the code if you need but its worth watching for added insight and an additional filter option that might be useful.

Hope this helps.

Thanks Curtis,

Ill check this out, it looks it will work…ill update u if anything…

Hi everyone,
I follow the same YouTube video.
Including bouncetime but when I input the words. The information in the table grid becomes blank. Can you suggest a possible solution? Thanks

I tried using this code from video and at wits end. No errors and finally went back and just went step by step and did the very basic search they had at beginning. Nothing. Here is problem I am guessing I am having: They, like all these stupid tutorials, start with some things already in place and then you find a pretty critical element was part of that initial stuff.

When I key in search words…the whole repeater disappers. Now, did I do wrong by using Add Item to place a repeater from the Lists & Grids. And what should or should not be connected to dataset for the individual button and the grid and its individual items? I have tried with absolutely no connections, some connections, etc…every possible combination, and nothing works like they show.

I have built as starting out on a dynamic page, on a regular page then connected to dataset, etc.

Chiu Joe I have the same thing going on, and like most of these tutorials they are leaving out something critical me thinks…they of course will not answer questions on the video thread and send you here. VERY FRUSTRATING!

Curtis, How did you get their code to work? I am getting nothing using the code they provide…I have to be missing something they did “off screen” that is critical

Curtis, as to the code within the video…I found possible issue causing the blank returns on search input. It is in this line of code
if (lastFilterTitle !== title) {

The conditional expression suggests that === may possibly be the proper one, but it then leads to no results change. but as soon as you put back in ! then the results go to blank. So not sure if in that code, or working with another line of code causing the blank results on search inquiry. At a loss and REALLY hoping that see some feedback on this as this would be a very nice search aspect to have, but just can not get to work!

Its now June 2018 and seems the problem still exists. I have the same problem and can get it to work. I followed the YouTube tutorial and the grid is blank when i apply the filter. I ask the question in the forum but nobody answer.