Forum Discussion

MelAclaro's avatar
MelAclaro
Community Member
11 years ago

How to display 2-decimal places in variable calculations?

Hi gang.

I've set up a number variable to display a calculation when two other numbers on the panel are summed.

The calculation works okay. The thing is, since these are currency calculations, I'd like the summed variable to display with two decimal places.

For example: $2.33 + 1.17 should display as $3.50 and not $3.5

I'm hoping one of you heroes can give some guidance about how I can effect the former. Thanks in advance.

Update: Sorry, I should have further clarified... I'm pretty certain this is a javascript solution. I guess what can help me here is if any Heroes can either share an online reference where I can learn for myself the code I need to include in the Execute javascript trigger, or (better yet) if you've implemented such code before -- or know how? -- then, would you be willing to share it? Thanks in advance. Below are links to: