Try always first to clarify your project…
What we know?
- You are using a repeater.
- You are using a dataset (non-dynamic one) → at least you think that

- You are using buttons (which should be hidden when no data found in DB)
- Oh hell, yes you are also using a —> DATABASE.
But wait! How is now the relation between DB ↔ DATASET <—> and REPEATER?
You have now your DATA stored in your DB.
Your DB is connected by a DATASET to a REPEATER.
So you are able to manage DATA directly out of the repeater…
Simple example: for " email "-datafield…
const datafield = "email"
$w.onReady(function () {
$w("#repeater1").onItemReady(($item, itemData, index) => {
console.log($w)
console.log(itemData)
console.log(index)
//----------------------------------------
const repeatedData = itemData[datafield]
if(repeatedData) {$item("#email").show()}
else {$item("#email").hide()}
});
});
If no entry in “email”-datafield, then element —> “#email” should be hidden.
Modify and expand this example for your own needs.
