Sum not Concatenate in "select one" rows

2401
2
04-08-2016 05:09 PM
GarretDubois
New Contributor II

Currently I have two rows in a survey that are set as “select
one” (see below-Failure Potential and Damage Potential). Is there a way to keep
them set as “select one” so that the selections have text associated with them and
have them sum,
NOT concatenate via
a calculation (see Hazard Rating below)?

Failure potential:

1-very low

2-low

3-moderate

4-high

Damage potential:

1-very low

2-low

3-moderate

4-high

Sum like this:

Hazard Rating: 5

NOT concatenate this

Hazard Rating: 23

0 Kudos
2 Replies
HannahFerrier
Occasional Contributor III

Have your tried casting your values as integers?

int(${value_1}) + int(${value_2}) should give you the sum of the integer values instead of concatenating the strings.

- Hannah

0 Kudos
GarretDubois
New Contributor II

Thanks Hannah, that did the trick. I appreciate your help.

garret

Garret Dubois

Biological Science Technician

Forest Service

Alaska Region, Forest Health Protection

p: 907-743-9469

f: 907-743-9479

garretddubois@fs.fed.us<mailto:garretddubois@fs.fed.us>

161 East 1st Ave. Door 8

Anchorage, AK 99501

www.fs.fed.us<http://www.fs.fed.us/>

<http://usda.gov/>[Forest Service Twitter]<https://twitter.com/forestservice>[USDA Facebook]<https://www.facebook.com/pages/US-Forest-Service/1431984283714112>

Caring for the land and serving people

0 Kudos