You are viewing limited content. For full access, please sign in.

Question

Question

CSS Class and JavaScript for Culculation Columns

asked on February 29, 2016

Hello-I want to make a group of table columns to calculate the following;

i.e., 20 (integer )  + 5 (integer)  / 4.5 (one-digit decimal number) = 5.6 (rounded up one-digit decimal number)

 

Could you show me how to set the CSS class for each column and the JavaScript to achieve this formula.

Thank You,

 

0 0

Answer

SELECTED ANSWER
replied on March 7, 2016

Hi Aya,

You can find a detailed walk-through for table calculations and where to add CSS classes by clicking this link

Also, using "Number" fields allows you to specify the number of decimals. If you want to round up, try using JavaScript's ceiling method, which rounds a number upward to it's nearest integer. To do this with tenths, you can multiply the number by 10, use the ceiling method, and then divide the result by 10. 

Let me know if this works for you!

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.