Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Getting numbers to round up using FormCalc

Avatar

06-06-2008

I'm trying to do a mileage form in LiveCycle. The mileage rate is .505 and the math rounds up fine when an odd number of miles is used (13, 15, 17 etc) ..so, miles x .505 = xx.xx until the user adds a bridge toll then the sum rounds down.



Check out my form and tell me what the heck I'm doing wrong please..

thanks!



http://www.kidango.org/kidango.pdf

Replies

Avatar

Avatar
Validate 1
Level 1
41globalit
Level 1

Likes

0 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
41globalit
Level 1

Likes

0 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
41globalit
Level 1

06-09-2013

What did you do to round up the number? thnx

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

09-09-2013

The FormCalc function to round numbers is Round().

To round a fields own value to two decimal places use:

$ = Round($, 2)

Avatar

Avatar
Validate 1
Level 1
41globalit
Level 1

Likes

0 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
41globalit
Level 1

Likes

0 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
41globalit
Level 1

10-09-2013

thanks so much, i am using num{zzzzzzz9.zz} at the moment and will try this function you listed as well and see if anything changes

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

10-09-2013

Well, the pattern will only change the displayed value but not the rawValue stored in the data DOM.

So you'll get the unrounded value when you use it somewhere else.