DATASET or DATABASE ? → DON’T MIX THEM UP !!!
In your code…
.
..
...
wixData.query("GymTraining")
.eq("_id", userid)
.find()
.then((results) => {
if (results.items.length === 0) {
$w("#button1").show();
...
..
.
You are queriying a → DATABASE with the ID → “GymTraining” <—
There are no CODE-PARTS showing anything about a → DATASET !!!
Also you are not really using your e-mail, instead you are using the USER-ID , to get related results from your —> DATABASE.
Did you already run the CODE ?
Which RESULTS did you get?
Show a screenshot with opened Object.