What is the best way to represent dollars in RTC?
What is the best way to represent dollars in RTC? Is there a way to represent dollars and cents in RTC? What is the best way to do calculations on dollars and cents withing RTC? For instance, if you want to have an attribute that sums the number or hours by an hourly rate. Let's assume that the number of hours and hourly rate are displayed in two individual attributes while the sum would be displayed in a separate attribute.
One answer
If you're using RTC 4.x you can use the new decimal type to represent monetary amounts. To calculate the value for the sum field you can create a JavaScript attribute value provider which reads the values of the other two fields and then sets the value of the calculated field. I'm not particularly familiar with JavaScript but you should ensure that you don't lose any precision when performing the arithmetic.