If statements conditions

227
1
03-09-2022 10:59 AM
BelyndaMower
New Contributor

My survey is for recycling tonnage.  Users report their tonnage amounts based on 30 different materials. Material 31 is "Single Stream" recycling which is converted into materials 1-8 based on a percentage of the total "Single Stream".  I am using Corrugated Cardboard as an an example, but I will need to apply the calculations to 7 other materials (8 total). I'm interested in the Corrugated Cardboard Total, and I'm not sure if I can use an if/else statement to do all the work in the calculate field, or if I should use separate calculations with relevant statements to arrive at the total. I am looking for one total that represents the Corrugated Cardboard and the Corrugated Cardboard converted from Single Stream.

Users who select Corrugated Cardboard only, use input value

Users who select Single Stream only, take input value and convert it into:

Corrugated Cardboard (ID 1)=Single Stream Total *0.21
Mixed Office Paper (ID 2)=Single Stream Total *0.16
Newspaper (ID 3)=Single Stream Total *0.09
Other Paper (ID 4)=Single Stream Total *0.18
Glass Bottles or Jars (ID 5) =Single Stream Total *0.07
Aluminum Cans (ID 6)=Single Stream Total *0.03
Steel Cans or Oil Filters (ID 7)=Single Stream Total *0.03
Plastic Containers (ID 8)=Single Stream Total *0.08

Users who select Corrugated Cardboard and Single Stream, take input value for Corrugated Cardboard and add it to the percentage of Single Stream to get total.

0 Kudos
1 Reply
DeonLengton
Esri Contributor

Hi Belynda

I'm trying my best to understand the requirement...

Can you give me some calculation examples - I'm thinking it must be easier to use a JavaScript function to do this...

 

0 Kudos