Need help with repeater data behaving randomly

@wix-expert-velo-cert Please understand that we are unable to debug or rewrite lengthy and complex code.

You state that you “removed the second dataset”, but I don’t see two datasets in your original code. Your new code still mixes the use of a dataset with directly doing a query using the wix-data API . The wix-dataset API is not the same as the wix-data API . The following code does not filter the dataset. The results returned from the query are in the variable results , and not in #dataset1 .

wixData.query("kisaandiary")
   .find()
   .then((results) => {
      var totalvalues = $w("#dataset1").getTotalCount();

I recommend reading the following:

  • Velo: Working with the Data API (using content directly with the wix-data API)

  • Connecting Content (using datasets)

You can also look at the various Data examples which demonstrate various ways to use your content.