Take a look at some examples of computed fields demonstrating the range and flexibility of this powerful feature.
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.
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
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&...p;hl=en&q=' + STREET + ',' + CITY + ',' + COUNTRY + ';t=h&z=14&output=embed"></iframe>'