SharePoint Designer 2010 for IT Pros

SharePoint Designer 2010 for IT Pros SharePoint Designer for IT Pros Table of Contents SharePoint Designer 2010 for IT Pros ..........................
Author: Beverly Bryan
9 downloads 0 Views 1MB Size
SharePoint Designer 2010 for IT Pros

SharePoint Designer for IT Pros

Table of Contents SharePoint Designer 2010 for IT Pros ..................................................................................... 1 Exercise 1 Create a new list using SharePoint Designer ................................................................................................2 Exercise 2 Create workflow using SharePoint Designer ..............................................................................................11 Exercise 3 Saving a Site as a Reusable Solution Package (.wsp) ..................................................................................16

SharePoint Designer for IT Pros

SharePoint Designer 2010 for IT Pros Objectives

Scenario

After completing this lab, you will be better able to: 

Create and modify lists on the SharePoint site



Create and modify workflows



Save SharePoint site as reusable template

The lab tasks demonstrate the use of SharePoint Designer 2010 for creating a SharePoint list and adding/removing columns from it. Then, you will create a new View for the list and apply conditional formatting to the view. Later, you create a new workflow associated with the list and create a custom action that starts the workflow. After building up the site, we will store that as a reusable template, which can be moved to any SharePoint 2010 environment.

Estimated Time to Complete This Lab Computers used in this Lab

60 Minutes

demo2010a The password for the Administrator account on all computers in this lab is: [email protected]

Page 1 of 17

SharePoint Designer for IT Pros

Exercise 1 Create a new list using SharePoint Designer Scenario In this exercise we create a new list on the existing SharePoint site using SharePoint Designer 2010. Tasks

Detailed Steps

Complete the following task on:

Note: In this task you will familiarize yourself with the new SharePoint Designer 2010 user interface and create a new list on the existing site. To begin this exercise, we need to create a site collection that we can open with SharePoint Designer.

demo2010a 1.

Creating a new list with SharePoint Designer

a. Open Central Administration b. On the Central Administration home page, click Create Site Collections under the

Application Management header. c. Make sure the Web Application http://portal.contoso.com is selected and fill in

the information as follows, then click OK: d. Title: SharePoint Designer Lab Site e. URL: http://portal.contoso.com/sites/spdlab f.

Template: Select the Collaboration tab and choose Team Site for the template

g. Primary Site Collection Administrator: contoso\administrator h. Once the site is created, launch SharePoint Designer 2010. Click Start > All

Programs > SharePoint > Microsoft SharePoint Designer 2010. A small dialog window will open to perform some initial configuration the first time SharePoint Designer is launched, and then the splash screen will appear. i.

In the OutSpace pane of SharePoint Designer, click on the Open Site button. This opens up the Open Site Dialog box.

j.

Enter http://portal.contoso.com/sites/spdlab in the Site name: field and click Open. When you are prompted for credentials, enter contoso\administrator for the User name and [email protected] for the password. After a few moments, the SharePoint site overview will open in the main windows of SharePoint Designer.

k. Notice the new navigation pane for SharePoint Designer 2010 on the left. This

pane is designed to accommodate all of the SharePoint objects (e.g. lists and libraries, master pages, workflows, etc.) that can be edited in SharePoint Designer.

SharePoint Designer 2010 can be used with SharePoint 2010 to create new site artifacts and to configure the site’s settings. Let’s continue by creating new list. l.

Click Lists and Libraries on the navigation pane to show the current lists that exist Page 2 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps in the site. m. Click SharePoint List > Custom List in the Ribbon to start the new list creation

process. n. Use the following values in the Create list or document library dialog. o. Name: Basic Products p. Description: A basic list of all products

q. Click OK to create the list r. Click the BasicProducts list created in the site. SharePoint Designer opens the list

in Summary view which details the information about the list and allows you to modify the settings for the list s. In the Summary View, you can edit list columns, create views and forms for the

list, create custom actions, change workflow settings etc.

Page 3 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps

2.

Note: In this task you’ll add and remove a few columns form the list you created in the previous task.

Manage columns on the list

a. In the Summary View for the list, click on the Edit list columns link under the

Customization group. This opens the List Column Editor Pane for the list columns.

b. Right-click on the Title column name and select Rename. c. Change Title to Product Name

d. In the Columns tab on the Ribbon, click on Add New Column > Number. e. Type Size for the Column Name. f.

Click Add New Column again to create the following columns:

g. Type: Number

Name: Weight h. Type: Currency

Name: List Price i.

Type: Currency Name: Standard Cost

j.

Type: Single line of text Name: Color

Page 4 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps k. Press CTRL+S to save the List Columns settings, l.

Click on the List Settings button in the Ribbon to return to the Summary View for the list.

m. Now, you should be able to browse to the list using the web browser and add

items to the view. Switch back to Internet Explorer and browse to http://portal.contoso.com/sites/spdlab n. Click on the Basic Products link in the Quick Launch, under the List header. o. Click the Add new item link to add items to the list according to the following

table: Product Name

Size

Weight

List Price

Standard Cost

Color

Product 1

10

10

$10

$1100

Red

Product 2

20

20

$20

$3000

Blue

Product 3

30

30

$30

$450

Yellow

Product 4

40

40

$40

$4500

Purple

Product 5

50

50

$50

$550

Silver

Page 5 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps

3.

Note: In the following task, you will create a new view for the list. You will also change the rendering logic of the list by using the new XSLT options available.

Create a new view for the list

a. Switch back to SharePoint Designer. Click Lists and Libraries in the Site Objects

pane on the left, then select Basic Products to open the Summary View of the list. b. In the Views section, click the New… button. This opens the Create New List View

dialog box. c. Type Standard Costs in the Name text box and click OK

d. In the Views section, click on the newly created Standard Costs view to open the

web page associated with the view in SharePoint Designer. It may take a minute for the page to render and display the list items. You will be applying conditional formatting to the SharePoint list view. You will use the conditional formatting tool to highlight the item row if the Standard Cost is greater than the List Price for that item. e. Once the view is opened for editing in SharePoint Designer’s Design view, click on

one of the item rows (as shown in the screenshot below) to activate the List View Tools bar in the Ribbon. (It may take a few seconds for the Ribbon tools to render)

f.

In the Ribbon, click Conditional Formatting > Format Row. This opens the Conditional Formatting task pane to the right and shows the Condition Criteria dialog box, which allows you to define the condition that Page 6 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps decides where the formatting should be applied. g. In the Field Name column, click the dropdown, scroll to the bottom of the

options, and select More Fields…

h. In the More Fields dialog box, check the Show data values check box. This shows

the data values from the list with the field names, allowing for easier selection. i.

Scroll through the list and select the Standard_x0020_Cost. field and click OK. (Note: There are two similar Standard Cost fields. As shown in the screenshot, choose the one that defines the cost as numeric value without the currency identifier.

Page 7 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps j.

Click the area below the header of the Comparison column and select Greater Than from the dropdown.

k. In the Value column, click the dropdown and select More Fields… l.

In the More Fields dialog box, check the Show data values check box.

m. As shown in the screenshot, select the List_x0020_Price. field and click OK.

Note: There are two similar List Price fields. As shown in the screenshot below, choose the one that has the field value as numeric format without the currency identifier.

n. Your Condition criteria at the end of the above steps should look like the

following:

Page 8 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps

o. In the Condition Criteria dialog box, click the Set Style button. This opens the

Modify Style dialog box which allows you to choose the highlight style you wish to keep for the item row if it meets the criteria you specified above. p. Select Background from the Category list. q. Click on the dropdown menu for background-color and choose a color for the

highlighted row. Click OK

r. Press CTRL+S to save the web page. Press F12 while in the SharePoint Designer

application window to view the web page in the browser. You will notice that all the rows are currently highlighted. s. Now you will change the values to see how conditional formatting is applied

dynamically. t. Click Product 2 to open the item. In the window that opens, click Edit Item in the

Ribbon. u. Change the values of the List Price to 4500:

Page 9 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps v. Repeat Steps t - u for Product 3 and Product 5 with the following values: w. Product 3: 500 x. Product 5: 700 y. Your list should look like the following screenshot when you are finished.

z. Notice how the conditional formatting only highlights those items where the

Standard Cost is Greater Than the List Price. aa. Close any open browser windows.

Page 10 of 17

SharePoint Designer for IT Pros

Exercise 2 Create workflow using SharePoint Designer Scenario In this exercise you will create new custom workflow using SharePoint Designer. Tasks

Detailed Steps

Complete the following task on:

a. Switch back to SharePoint Designer 2010. b. In the Navigation Pane on the left, click on List and Libraries. c. Click on the Basic Products to open it in Summary View.

demo2010a 1.

d. You will now create a workflow associated with this list. The workflow called

Monitor List Price compares the List Price of the item on which it is run with a threshold value. If the list price is greater than the threshold, a task item is assigned to the reviewer to review the list price.

Creating a workflow

e. In the Workflows section on the right side of the Summary view click on New…

button. This opens the Create List Workflow dialog box.

f.

Type WFBasicProducts in the Name text box, then type Monitor list price in the Description text box and click OK.

After a short pause, the new Workflow Designer will open. The workflow by default has a Step1 in it with an orange flashing horizontal cursor, allowing you place a condition or action in the step.

Page 11 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps

g. Before creating the first workflow step, create a local variable that you will use for

the workflow. In the Ribbon, click on Local Variables to open the Workflow Local Variables dialog box.

h. Click the Add button. i.

Type ListPriceThreshold in the Name text box and set the Type dropdown to Number. Click OK.

j.

Click OK on the Workflow Local Variables window to return to the Workflow Designer.

k. Double click on the Step 1 title to make visible a text box. Type Assign Review To-

Do in the text box to name the step.

l.

Click in the area below the text box to start creating the workflow.

m. In the Ribbon, click Action > Set Workflow variable.

The step in the workflow now reads Set workflow variable to value.

n. Click on the workflow variable link and select Variable:ListPriceThreshold from the

dropdown list. o. Click on value link and type 3000 in the text box. The completed action looks like

as follows

p. Click below action you just created to place the cursor below it (don’t click

Page 12 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps outside the step box, just beneath the text). q.

In the Ribbon, click on Condition > If current item field equals value. This will insert a condition sentence, “If field equals value” in the step.

r. Click on field link in the sentence and select List Price from the dropdown list.

You may need to scroll down to find List Price.

s. Click on equals link and select is greater than from the dropdown list. t. Click on the value link and click on the Fx button

that appears. This opens

the Lookup dialog box. u. In the Data Source dropdown list, select Workflow Variables and Parameters. v. In the Field from source dropdown list, select Variable:ListPriceThreshold.

w. Click OK to return to the Workflow Designer. x. Ensure that the cursor is inside the conditional block just created in the above

steps (as shown below).

y. In the Ribbon, click Action > Assign a To-do Item to place the Assign a to-do item

to these users action in the conditional block. (Note: You will need to scroll through the Action list to find the Assign a To-Do Item) z. Click on a to-do item link to open the custom task wizard. Click Next.

Rr

Page 13 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps aa. Type Review List Price in the Name text box and click Finish. bb. Click on these users link in the action to open the Select Users dialog box. cc. Select the second instance of Contoso Administrator from the existing users and

groups list and click the Add >> button, then click OK.

dd. Press CTRL+S to save the workflow in the SharePoint site. ee. Now, you need to publish the workflow to the SharePoint site so that it is

available for use with the list. Click on the Publish button in the Ribbon. A progress bar indicating the status of the workflow publishing is displayed while the publishing is in progress. ff. Once the workflow is published, click the WFBasicProducts link in the breadcrumb

bar (below the open tabs) at the top of the workflow designer to switch to the Summary View for the workflow.

gg. This view displays the properties of the workflow along with start options, tasks

and history lists, forms, and more.

Page 14 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps hh. Click on the Open associated list link in the Customization section to open the

Summary view of the list with which the workflow is associated. ii. Scroll down the page to the Workflows section on the right. Press CTRL+F5 to

refresh the Summary View for the list. You should now see the newly created workflow in the Workflows slab for the list.

Page 15 of 17

SharePoint Designer for IT Pros

Exercise 3 Saving a Site as a Reusable Solution Package (.wsp) Scenario Now that you have gone through all the work setting up this site, you can save it as a reusable template. In SharePoint 2010, site templates are stored as solution packages (.wsp files), which can be easily transferred between different environments or imported into Visual Studio 2010 for further development. Tasks

Detailed Steps

Complete the following task on:

a. In SharePoint Designer 2010, click the SharePoint Designer Lab Site link in the

demo2010a 2.

Saving a site as a template

navigation pane to open the Summary View for the site. In the Ribbon, click Save as Template. A new browser window will open and you will be redirected to the Save as Template page. b. Use the following values for the template c. File Name: ProductMgmtSite d. Template Name: Product Management Site e. Template Description: Example product management site f.

Included Content: Checked

g. Click OK to continue. h. When the Operations Completed Successfully page appears, click OK. It may

take a minute or so for the operation to complete. i.

Click Site Actions > New Site

j.

Click the Blank & Custom category on the left. Select ProductMgmtSite from the available templates.

Page 16 of 17

SharePoint Designer for IT Pros Tasks

Detailed Steps k. Finish creating the site with the following settings: l.

Title: New Template Site

m. URL: templatesite n. Click Create to create your new site. o. Since site templates are now stored as Solution files, you can download the

solution package from the Solution Gallery and use it in any other SharePoint 2010 environment. If you need further extend the functionality of the solution, you can also import the solution package to Visual Studio 2010. p. Close SharePoint Designer 2010 and Internet Explorer

Page 17 of 17