Error developing search for database

https://www.wix.com/corvid/example/search
Hello!
I did the search exactly following the example, but it does not work. Please help me, very urgently needed!
Thank you in advance

import wixData from "wix-data";

$w.onReady(() => {
  loadContinents();
});

let lastFilterSpecies;
let lastFiltergenomeComposition;
let debounceTimer;
export function iSpecies_keyPress(event, $w) {
 if (debounceTimer) {
    clearTimeout(debounceTimer);
    debounceTimer = undefined;
  }
  debounceTimer = setTimeout(() => {
    filter($w('#iSpecies').value, lastFilterSpecies);  
  }, 500);
}

export function iGenome_change(event) {
  filter(lastFilterSpecies, $w('#iGenome').value); 
}

function filter(species, genomeComposition) {
 if (lastFilterSpecies !== species || lastFiltergenomeComposition !== genomeComposition) {
 let newFilter = wixData.filter();
 if (species)
      newFilter = newFilter.contains('articleTitle', species);
 if (genomeComposition)
      newFilter = newFilter.contains('genomeComposition', genomeComposition);
    $w('#Gemini').setFilter(newFilter);   
    lastFilterSpecies = species; 
    lastFiltergenomeComposition = genomeComposition;
  }
}

function loadContinents() {
  wixData.query('Continents')
    .find()
    .then(res => {
 let options = [{"value": '', "label": 'All Continents'}];
      options.push(...res.items.map(continent => {
 return {"value": continent.title, "label": continent.title};
      }));
      $w('#iGenome').options = options;
    });

}

export function iSpecies_change(event) {
 //Add your code for this event here: 
}

export function iSpecies_keyPress_1(event) {
 //Add your code for this event here: 
}

function toggleFold(index) {
 let $fold = $w('#fold' + index);
 let $arrowDown = $w('#arrowDown' + index);
 let $arrowRight = $w('#arrowRight' + index);
 // toggle the fold at the index
 if ($fold.collapsed) {
    $fold.expand();
    $arrowDown.show();
    $arrowRight.hide();
  }
 else {
    $fold.collapse();
    $arrowDown.hide();
    $arrowRight.show();
  }
 // collapse the other folds
  [1,2,3,4]
    .filter(idx => idx !== index)
    .forEach(idx => {
      $w('#fold' + idx).collapse();
      $w('#arrowDown' + idx).hide();
      $w('#arrowRight' + idx).show();
    })
}

You didn’t “exactly” follow the example. You made changes based on your needs, but you then need to make sure that you make all of the changes to the code that are required.

Please check the latest screenshots and code

@qoobbell In your page’s onReady() function you call a routine called loadGemini() or loadGemini-one() but you don’t have that function in your code. As you can see, you have errors flagged.

Maybe what you meant was

$w.onReady(() => {
  loadGenome_Composition()
});

BTW - The name loadGemini-one is invalid, a dash cannot be used in a function or variable name. The name Gemini-one for the collection is OK however.

I would suggest starting with the example. Once you see it working, you can then make changes to the code to adapt to your requirements.

@yisrael-wix So where can I get the correct function name?

@qoobbell I showed you in my previous post:
loadGenome_Composition();

@yisrael-wix The site behaves very strangely. The genome is not from that database at all, but the search for the genome is correct. According to the words does not find. When typing a word, the genome disappears. I also send you a code

@yisrael-wix

import wixData from "wix-data";

$w.onReady(() => {
  loadGenome_Composition()
});

let lastFilterSpecies;
let lastFiltergenomeComposition;
let debounceTimer;

export function fold1_keyPress(event) {
 if (debounceTimer) {
    clearTimeout(debounceTimer);
    debounceTimer = undefined;
  }
  debounceTimer = setTimeout(() => {
    filter($w('#fold1').value, lastFilterSpecies);  
  }, 500);
}

export function iGenome_change_1(event) {
filter(lastFilterSpecies, $w('#iGenome').value); 
}


function filter(species, genomeComposition) {
 if (lastFilterSpecies !== species || lastFiltergenomeComposition !== genomeComposition) {
 let newFilter = wixData.filter();
 if (species)
      newFilter = newFilter.contains('articleTitle', species);
 if (genomeComposition)
      newFilter = newFilter.contains('genomeComposition', genomeComposition);
    $w('#Gemini').setFilter(newFilter);   
    lastFilterSpecies = species;   
    lastFiltergenomeComposition = genomeComposition;
  }
}

function loadGenome_Composition() {
  wixData.query('Genome_Composition')
    .find()
    .then(res => {
 let options = [{"value": '', "label": 'Genome_Composition'}];
      options.push(...res.items.map(Genome_Composition => {
 return {"value": Genome_Composition.title, "label": Genome_Composition.title};
      }));
      $w('#iGenome').options = options;
    });

}

@qoobbell I thought the name of your collection was Gemini-one. However, you are not using that name in your query:
wixData.query(‘Genome_Composition’)

I would suggest opening the example in the editor and playing with it. You will need to familiarize yourself with basic coding concepts to accomplish what you want. There are a wealth of Javascript coding sites which will help you learn Javascript from basic to advanced - Javascript.info is a good one. The Corvid Resources page provides tutorials, examples, and articles on getting the most out of Corvid. We are happy to get you pointed in the right direction, but you’ll need to take it from there. As questions or difficulties arise, we are here to help.

@yisrael-wix If it helps

@qoobbell You may want to check out the WixArena - it’s a hub where you can look for Corvid (and other) experts for hire.

@yisrael-wix I do not have grant money at the moment. But I ask you, as an expert. After all, on the forum, everyone helps each other.

@qoobbell Please realize that you can’t just “copy and paste” code and expect it to work. You need to understand what’s happening if you expect to be able to write code that does what you want. Understand that we are unable to provide full solutions. You will need to learn basic coding concepts to accomplish what you want.

I would suggest starting with the example. Once you see it working, you can then make changes to the code to adapt to your requirements.

If you need this urgently, then I would suggest you search the WixArena who can perform the work for you.