Collection does not exist, although, it actually exists.

export function Verificar(event) {
 // Add your code for this event here: 
    console.log("salio")
    wixData.query("Juicios Ejecutivos")
    .eq("idCliente", $w("#input22").value)
    .find()
    .then((resul) => {
        console.log(resul)
 if(resul.length > 0){
            console.log("Ya existe el codigo")
        }
 else console.log("nuevo codigo")
    })

And the error message is : WDE0025: The Juicios Ejecutivos collection does not exist. You cannot work with a collection using the Data API before it is created in the Editor.

Is it a bug? Also if I change the name with no spaces like juicios_ejecutivos I have the same problem.

wixData.query("Juicios Ejecutivos")  //this parameter should be the id of //the collection

Is “Juicios Ejecutivos” the id of the collection ?
You can see the collection’s id in the collection settings. Please check.

It works with the ID! Thanks, in the docs it said “collectionname” though

1 Like

@diavolical Okay, welcome.