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

formcalc calculation with percentage

Avatar

Avatar
Validate 1
Level 1
akmeeran
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
akmeeran
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
akmeeran
Level 1

06-01-2021

Dear all

 

Just i try to do formcalc....basically GST percentage multiply by  Amount and divided by 100....for example my input percentage .15%. not 15%...if i apply like this  

$.rawValue = (Row1[*].Cell9)*100
sum ($.rawValue*Row1[*].Cell7/100)

this formula will work only first row....it mean formula will not calculate all rows values. plesae give me some suggestion....thanks for your support.

Untitled-1.jpg

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

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

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

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

08-01-2021

Is the second row also named Row1? If not, the script won't work there, since Row1[*] resolves all instances of an element named Row1. In what field do you place the calcuation script?

Avatar

Avatar
Validate 1
Level 1
akmeeran
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
akmeeran
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
akmeeran
Level 1

08-01-2021

Dear radzmar

Thanks for your reply, here i attached result screen shot.
which given code is correct. but little modify for percentage formula. please review this code

var SGST = Sum(Row1[*].Cell10) * 100
var Amount = Sum(Row1[*].Cell7)
$ = SGST * Amount / 100

but secount row will not calculate as per this code... this calculate base on first row percentage value.
please review my screen shot.

Untitled-2-01.jpg

Untitled-1-01.jpg

thanks

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

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

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

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

08-01-2021

The line $.rawValue = (Row1[*].Cell9)*100 makes no sense, what are the brackes for?

If a refered field is in the same row, you don't need to reference the row. 

 

$ = Cell9 * 100

 

To reference all instances of the field in every row use the sum() method

 

$ = Sum(Row1[*].Cell9) * 100

 

To calculate a subtotals use variables.

 

var SubTotal1 = Sum(Row1[*].Cell9) * 100

var SubTotal2 = Sum(Row1[*].Cell7) * 100

$ = SubTotal1 * SubTotal2