Post

2 followers Follow
0
Avatar

sum custom fields of type pick list

hello there,

 

i have created two custom fields of type picklist, i want to sum the values selected by the user in a third custom field.

 

how do i achieve this?

 

thanks!

Sri

Import from old forum Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Sri,

To sum numeric values in your picklist, you can create a third custom field and make the field type "Numeric."  Next, you also want to check the "Formula" checkbox (and leave the dropdown as "This Object").  Now, in section 3, you will write the formula for the summation.

Let's say the first picklist is called "Values."  (Its API will automatically be created as C_Values - this information can be retrieved from the list of Fields on the right-hand-side.)  Let's also assume the second picklist is called "Values2."  (Its API will automatically be created as C_Values2 - this information can be retrieved from the list of Fields on the right-hand-side.)

The formula for the above scenario will be as follows:

ToNumber(ToString($C_Values)) + ToNumber(ToString($C_Values2))

Without getting too technical, you cannot simply use "$C_Values + $C_Values2" because these are not references to the actual data inside the field - you must convert that value to a Number using the ToNumber function; to use the ToNumber function, you need to convert the value to a String, first, using ToString.

I hope this helps; please let us know if we can help clarify anything.

-Rob

Clarizen Team 0 votes
Comment actions Permalink