Not sure if anyone had a similar issue, but I have a textbox in which I want to show data from an external connection. With below code, it just works fine to display colums which have a field type “Text”. But it doesn’t work with colums which have a field type “Number”.
So if I use $w(‘#text18’).text= results.items[0].description (text field), the data is shown smoothly in my textbox; But when I use $w(‘#text18’).text= results.items[0].duration (number field), nothing is shown. I looked up in the litterary but couldn’t find anything which would help me further. Any support is highly appreciated!
import wixData from ‘wix-data’;
export function externalQuery() {
let inputdata= $w(‘#input1’).value
wixData.query(“Hotel/bookings”)
.eq(“product_code”, inputdata)
.find()
.then((results) => {
console.log(results.items[0]);
$w(‘#text18’).text= results.items[0].duration