Hello, I am currently trying to get a repeater to be populated with data from a data sheet, filtered with a query (to eliminate blank items). My first major stumbling block is that I can't seem to get the data to be accessed on the page at all. This is my current code, I am trying to start out by getting the items in the query data array to show up in the console.
This is my code, currently returning no results or errors:
import wixData from 'wix-data'; wixData.query("dataset1") .find() .then( (results) => { let items = results.items; console.log(items); } ) ;
please help, thanks.
I had to transform the data into float: https://www.wix.com/corvid/forum/community-discussion/user-number-input-calc-then-output-solved Mauro Vento Avyno worked for me as is pretty much
More, did you update 'Sandbox' and 'Live' collection ?
try:
import wixData from 'wix-data'; let options={suppressAuth:true, suppressHooks:true} wixData.query("collection1", options) .find() .then( (results) => { let items = results.items; console.log(items); $w("repeaterZ").data=items; }) ;