I have found that a new function has been added that solves the problem with the script above. using the ToCurrency function the above script isn't needed. the answer to my question is the script below

.if.(calc->totallabor=0).then."".else.(tocurrency(calc->totallabor,2))

## Scott Mickalide

Hi,

this is an old formula that has worked for us for many years. recently we had a project that was over $1,000,000.00 for labor but this formula doesn't put the comma in the correct place for that amount. works fine as long as the amount isn't over $999,999.00

how can the formula below be edited to allow for 1,000,000.00?

.if.(calc->totallabor=0).then."".else.(.if.len(totext(calc->totallabor,2))>6.then.first(totext(calc->totallabor,2),len(totext(calc->totallabor,2))-6)+","+last(totext(calc->totallabor,2),6).else.totext(calc->totallabor,2))