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

sum round

Avatar

Avatar
Validate 1
Level 2
khaldoona993089
Level 2

Likes

8 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
khaldoona993089
Level 2

Likes

8 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
khaldoona993089
Level 2

18-01-2019

I want a script that round  sum into ( nearest 100 and nearest 1000232.jpg

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

18-01-2019

As I mentioned in the same thread yesterday (please do not post same threads as we will delete one of them)  - this is not an Experience Manager question - but a general code question. For this question - look at the great online threads that answer this - such as how to round using JavaScript -- javascript - Round number to nearest thousand, up or down depending on the number - Stack Overflow

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

279 likes

Total Posts

1,105 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

279 likes

Total Posts

1,105 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

21-01-2019

Hi Khaldoon,

As Scott mentioned you can use common JS functions in this case.

Math.round will work fine in this case.

When you do a set value for the field, put it something this

NumericField1.rawValue=Math.round(this.rawValue);

Thanks,

Mayank