Product help with community knowledge

### Page statistics

2510 views13 edit(s)5623 characters(s) Page last modified 10:40, 13 Jun 2012 by michelle.stone

# Computed Fields: Small but Powerful

1. 1. Text
2. 1.2. Text with a link:
2. 2. Math
3. 3. Conditions/Testing
4. 4. Mashups

Take a look at some examples of computed fields demonstrating the range and flexibility of this powerful feature.

#### Math

Next up – math!  I’m sure you’ll quickly see how this can be very useful, especially if your current processes rely on Excel.

This can be extended to use more complex calculations.

#### Conditions/Testing

We can use computed fields for conditioning logic as well.

```-- tests the input value against the value of 50
CASE
WHEN (CAST(TEST_VALUE as FLOAT) > 50)
THEN 'The test value is greater than 50'
WHEN (CAST(TEST_VALUE as FLOAT) < 50)
THEN 'The test value is less than 50'
WHEN (CAST(TEST_VALUE as FLOAT) = 50)
THEN 'The test value is equal to 50'
ELSE
'Value cannot be compared to 50'
END```

#### Mashups

This next example shows a slick way to embed a Google map from the address information provided.

'<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;...p;hl=en&amp;q=' + STREET + ',' + CITY + ',' + COUNTRY + ';t=h&amp;z=14&amp;output=embed"></iframe>'