I am attempting to query my database called battery2221 but keep getting no results. I’ve read all the API documentation but can’t seem to find the problem. Any feedback is greatly appreciated. Here is my page code:
import { getVINInfo } from 'backend/VINModule';
import wixData from 'wix-data';
$w.onReady(function () {
//TO DO: Write Your Page Related Code Here:
})
export function button1_click(event, $w) {
//Add your code for this event here:
getVINInfo($w("#vininput").value)
.then(VINInfo => {
console.log(VINInfo)
let year = VINInfo.Results[9].Value;
let make = VINInfo.Results[6].Value;
let model = VINInfo.Results[8].Value;
let engine = VINInfo.Results[71].Value + " " + "Liters"
let car = VINInfo.Results[9].Value + " " + VINInfo.Results[6].Value + " " + VINInfo.Results[8].Value;
wixData.query("battery2221")
.include("title")
.eq("year", year)
.eq("make", make)
.eq("model", model)
.find()
.then((results) => {
console.log(results);
$w("#results").text = "Vehicle Specific Battery for Your" + " " + car;