Ok, let’s do it together!
- When you get this part to work, then you will get all other code-parts to work.
$w.onReady (function() {
$w("#dataset1").onReady(() => {
let count = $w("#dataset1").getTotalCount();
console.log(count)
})
});
-
I would suggest you to create a second dataset (“dataset2”) and connect it with your Database (“LawDatabase”). It can be setted-up to “Read-Only”.
-
Did you set the Database-permissions to “everyone” ?
-
Run the given code (you have just to open the site) and look what does the console say?
If you get already an error or you have “null-result”, try to make a more simple DATABASE with just the given “title” field and put 3-10 items into it.
- Connect your dataset, with this new DATA-COLLECTION, run the code again.
Did something changed, or still no results?
EDIT: DEACTIVATE all your OLD-CODE before you do the test.
You can do it when you comment out your code like this…
Start to comment out CODE ----> /*
…
all CODE here will be commented out and gets deactivated.
…
End to comment-out CODE —> */