Good evening,
@tony-brunsman Thank you for your response! I’ve been playing with the code all day and think I may have found a solution but am now receiving this error code:
Wix code SDK error: The data parameter that is passed to the data method cannot be set to the value . It must be of type array.
Here is my current 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)
$w("#results").text = VINInfo.Results[8].Value + " " + VINInfo.Results[5].Value + " " + VINInfo.Results[7].Value;
$w("#dataset1").setFilter(wixData.filter()
.contains("year", VINInfo.Results[8].Value)
.contains("make" , VINInfo.Results[5].Value)
.contains("model", VINInfo.Results[7].Value))
.then((results) =>{
console.log("Dataset is now filtered");
let results2 = "battery"
$w("#repeater1").data = results2.data;
})
.catch((err) => {
console.log(err);
});
});
}
Any thoughts on where I went wrong with the code?
BTW, battery is the name of the referenced product field from my database.