(SOLVED) - What am I missing? (syntax problem?)

@gemats

Also, console.log (count) returns NULL… ???

Ok, this is a little bit strange.
I would first check the following things…

  1. Check my DATABASE —> are the same items in my LIVE-Database as in Previewmode? (Databases are synced?)
    Because if not, perhaps you look at the preview-database, which can have 446-items, but your live database is empty. Or vise versa.

  2. Check also the database-permissions, perhaps they block your code.

  3. Check Read & Write options (already mentioned by J.D.).

  4. Delete all other code, like J.D. said before and just do a simple test with related code-part.

  5. Perhaps take a look again at my example, which works without any errors again and try to reconstruct exactly the same situation.

  6. Also check the right options and connection of your dataset.

And if nothing helps, than i would do the next step and post it into “rolling out improvements”.