hi thanks for the support I entered the cod below and I got the following under it
const getColor = ( num ) => num > 0 ? ‘green’ : num < 0 ? ‘red’ : ‘black’ ;
$w . onReady (() => {
$w ( ‘#dataset6’ ). onReady (() => {
$w ( ‘#table7’ ). columns = $w ( ‘#table7’ ). columns . map ( e => {
if ( e . dataPath === ‘chg’ ) { e . type = ‘richText’ ;} return e ;});
$w ( ‘#table7’ ). rows = $w ( ‘#table7’ ). rows . map ( e => { e . chg = <p style="color: ${ getColor ( e . chg }; ">${e.chg}</p>; return e;});
})
} );
public/pages/c1dmp.js: Unexpected token, expected “,” (6:91) 4 | $w(‘#table7’).columns = $w(‘#table7’).columns.map(e => { 5 | if(e.dataPath === ‘chg’) {e.type = ‘richText’;} return e;}); > 6 | $w(‘#table7’).rows = $w(‘#table7’).rows.map(e => {e.chg = <p style="color:${getColor(e.chg};">${e.chg}</p>; return e;}); | ^ 7 | }) 8 | });