08.08.2017 Views

designer

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

80 Chapter 3 Working with Lists and Libraries<br />

11. Click OK to close the Column Editor dialog box.<br />

The list of columns for the Sales list now contains the Region column.<br />

12. Right-click the Sales tab, and then click Save.<br />

CLEAN UP Leave SharePoint Designer open if you are continuing to the next<br />

exercise.<br />

Using Calculated Columns<br />

In many scenarios, you need to display data that can be calculated from data already<br />

included in the list. This is when you use a calculated column, which uses formulas similar<br />

to those in Excel and Access. Calculated columns can contain functions, column references,<br />

operators and constants, as well as IF statements.<br />

See Also For more information on calculated columns, see the series of blog posts titled<br />

“Taming the Elusive Calculated Column” at www.endusersharepoint.com/2008/06/12/tamingthe-elusive-calculated-column/.<br />

For information on the maximum number of IF statements in a<br />

column, see http://blog.pathtosharepoint.com/category/calculated-columns/.<br />

In this exercise, you add a calculated column to the Sales list.<br />

SET UP Using SharePoint Designer, open the team site you used in the previous<br />

exercise if it is not already open, and display the list of columns for the Sales list as<br />

described at the start of the previous exercise.<br />

Add New Column<br />

1. On the Columns tab, click Add New Column and then click Calculated (calculation<br />

Based on Other Columns).<br />

The Column Editor dialog box opens.<br />

2. In the Insert Column list, double-click List Price, and then double-click Quantity<br />

Purchased.<br />

The Formula box contains the text [List Price][Quantity Purchased].<br />

3. In the Formula box, place the insertion point after the first closing square bracket ( ] )<br />

and before the second opening square bracket ( [ ), and then type *.<br />

The formula should look similar to [List Price]*[Quantity Purchased].<br />

4. In the Data type returned list, select Currency, and in the Currency format list,<br />

select British Pound, if it is not already selected.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!