Add a .catch() for the “error” condition of there not being results for your query. Then do another query for the “000” row. Something like this:
function search() {
wixData.query(‘ZipCodes’)
.eq(‘serviceZip’, $w(“#searchBar1”).value)
.find()
.then(res => {
$w(‘#repeater1’).data = res.items;
})
.catch((error) => {
// normally, catch is for error conditions, however…
// you can display the row you want here
wixData.query(‘ZipCodes’)
.eq(‘title’, “000”)
.find()
.then(res => {
$w(‘#repeater1’).data = res.items;
})
.catch((error) => {
// if we get here, it really is an error!
let errorMsg = err;
});
});
}
This isn’t tested, but it should be OK.
I hope this helps,
Yisrael