Putting code in a repeater

Thanks :grinning:

I’ve pasted in the code from the Velo page you pasted (thank you). I’ve changed a couple of things for my code. I’m not sure what I should put in inplace of ($item, itemData, index).

Could you help? Some of the entries will have the same session(“userID”) as multiple entries in the db. Can you point me in the right direction?

The code is:

$w( “#repeater1” ).forEachItem( ($item, itemData, index) => {
let repeatedElement = $item( “image1” );
let itemDataValue = itemData.someProperty;
let isEvenItem = index % 2 === 0 ;
console.log( "ANS: " + $item( “image1” ));
if (itemData.hide === true ) {
$w( “#image1” ).hide()
} else {$w( “#image1” ).show()}
} );

Tom