@tiaan … I’m trying to use the foreach function, but I don’t think I’m doing it correctly. Would you mind looking at my code and sending something that would work?
$w.onReady( function () {
$w(“#dynamicDataset”).onReady(() => {
populateCalculatedFields();
} );
$w(“#dynamicDataset”).onCurrentIndexChanged( (index) => {
populateCalculatedFields();
} );
} );
function populateCalculatedFields() {
const currentItem = $w(“#dynamicDataset”).getCurrentItem();
$w(“#repeater1”).forEachItem( ($item, itemData, index) => {
console.log($w(“#priceText”).text);
var number = Number($w(“#priceText”).text);
console.log(number.toLocaleString());
$w(“#priceText”).text = “$” + number.toLocaleString();
});
}