Collapsing elements - an embarassing question by an old COBOL programmer

And yes, COBOL is a language…

My requirement: collapse an empty image in a repeater (the frequently asked question here it seems, I read them all…).

Below is the shortest piece of code I found on the great forum, looks good to me, but it does not work for me.

import wixData from ‘wix-data’;
$w.onReady(() => {
$w(“#texteTango”).onReady(() => {
$w(“#textRepeater”).forEachItem(($item, itemData) => {
if(!itemData.image1){$item(‘#imageX178’).collapse();}
})
})
})

Velo tells me that

"onReady … is not a function. "

And it underlines the dataset name.

My data:
Content-table: “Texte”
dataset name: “texteTango”
repeater-name: “textRepeater”
field-key: “image1”
repeater-field: “imageX178”

I cannot see my error that is surely totally obvious to one of you…

  1. Sure that you dataset is existing?
  2. Sure that your dataset-ID is called → texteTango (not the name! Use —> ID)

Me much stupid … I had looked for the dataset id in all the wrong places and not found any. Now I did, after your prompt. Thank you!

:wink: