Multiply then divide

359
4
Jump to solution
10-27-2021 09:31 AM
JaredPilbeam2
MVP Regular Contributor

Is it not possible to do this?

 

 

${carpetyards} * 84.4 div 2000

 

 

 I'm not getting an error but I'm also not getting a result.

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Honored Contributor

Not sure how the order of operations works in S123, but I can get a similar expression to work just fine.

How is your carpetyards field formatted? Is it possible the form is reading it as text? When I enter a string like "8,800", it fails to compute.

jcarlson_0-1635354399961.png

jcarlson_1-1635354633687.png

 

 

 

- Josh Carlson
Kendall County GIS

View solution in original post

4 Replies
jcarlson
MVP Honored Contributor

Not sure how the order of operations works in S123, but I can get a similar expression to work just fine.

How is your carpetyards field formatted? Is it possible the form is reading it as text? When I enter a string like "8,800", it fails to compute.

jcarlson_0-1635354399961.png

jcarlson_1-1635354633687.png

 

 

 

- Josh Carlson
Kendall County GIS
JaredPilbeam2
MVP Regular Contributor

Josh,

The carpetyards field is an integer type.

222.png

It wasn't (isn't) working in S123 Connect, but it is in the web app. Go figure. But, I guess I have a new problem. It isn't showing decimals?

JaredPilbeam2_0-1635357441411.png

I'm no good at math, but my calculator tells me 66 * 84.4 / 2000 = 2.78.

0 Kudos
jcarlson
MVP Honored Contributor

You have tons set to an integer as well. Set it to decimal to fix that.

- Josh Carlson
Kendall County GIS
JaredPilbeam2
MVP Regular Contributor

That did it. Thanks a bunch.

0 Kudos