I am trying to display a label (svg or png) in a repeater that is connected to a data collection in CMS. However, the label should only be displayed when the boolean value is true in the connected data collection. I tried to solve it with the following code, but it didn’t work. Has anyone had a similar issue or knows how to solve it?
const shouldShow = itemData.showgraphic; // field key from your dataset
if (shouldShow) {
$item("#vectorImage8").show();
$item("#vectorImage8").expand();
} else {
$item("#vectorImage8").hide();
By creating a filter that checks if a certain value in the itemData is “true” with .eq(), you can make the repeater only populate with the items you desire.