navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

SharePoint Designer 2010: Creating Data-Driven Web Pages

SharePoint Designer 2010: Creating Data-Driven Web Pages

with Simon Allardice

 


Explore how to use SharePoint Designer to create rich, highly visual web pages in SharePoint that connect, read, and even update information stored externally. Author Simon Allardice shows how to manage data sources that connect to different databases, web services, and XML files, without any coding necessary. It also covers how to provide powerful visual information with conditional formatting, and how to make custom data entry forms.
Topics include:
  • Creating new web pages
  • Working with existing lists and libraries
  • Reading data from an XML file, external database, or web service
  • Using Business Connectivity Services (BCS)
  • Working with Data View and Data Form web parts
  • Filtering, sorting, and grouping data
  • Creating master/detail pages
  • Displaying richer data with formatting and formulas
  • Creating custom forms

show more

author
Simon Allardice
subject
Business, Collaboration, Web, CMS
software
SharePoint 2010
level
Intermediate
duration
2h 55m
released
May 12, 2011

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:03Hi! I am Simon Allardice, and welcome to SharePoint Designer 2010: Creating
00:08Data-Driven Web Pages.
00:09SharePoint has become a huge part of many organizations, but most of them still
00:14have a lot of data and it's not all in SharePoint.
00:17It's in other databases, other systems, and it's going to stay there.
00:21In this course, I'll take you through how to get to that data and get it into
00:25your SharePoint web pages, so you can view it, analyze it, format it, use it,
00:30even edit it using the regular SharePoint web interface.
00:34I'll then talk about how to connect to external systems, databases, web
00:38services, XML files.
00:40We'll explore something called BCS, a new feature in SharePoint 2010, designed
00:45to make your life easier when doing this.
00:47And we'll see how to format pages and web parts and apply your own formatting
00:51rules to highlight and display data the way that's most useful for you.
00:56And we'll finish by creating custom forms to allow you to create and edit
01:00information in external systems.
01:02So let's get started.
Collapse this transcript
What you should know
00:00To get the most out of this course, I need you to know about SharePoint, about
00:04web sites, and about databases.
00:06This course is not an introduction to SharePoint.
00:09I expect you know your way around SharePoint 2010 already.
00:13You know how to work with SharePoint sites, with lists and document libraries.
00:17You can work with web parts, work with the ribbon on a SharePoint 2010 site, and
00:22you know how SharePoint works with Office.
00:24If that's not the case, take a look at our other courses on lynda.com, like
00:28SharePoint 2010 Getting Started or SharePoint 2010 Essential Training.
00:32Now, if you have web development experience and know some HTML and CSS,
00:37that's very useful.
00:38Most of what we'll do in this course doesn't even need that, but for some of the
00:42advanced features it will come in handy.
00:44And we're going to talk to databases here. So whether that's Access, or SQL
00:49Server, FileMaker, or Oracle, I don't need you to be an expert, but you
00:54should be good with core database concepts, the idea of tables of data in rows and columns.
01:01Now what don't you need?
01:02Well, you don't need programming experience.
01:04I don't need you to write code.
01:05We won't be writing any code in this course. We won't need to.
01:09It's one of the great abilities about this platform;
01:11you can do amazing things without programming.
01:13And I don't need you to know SharePoint Designer 2010 already.
01:17If you do, that's great; we will be using it. But I'll cover what you
01:20need to know about it.
01:21Now what we're going to do here in this course is very specific to the 2010
01:27version of SharePoint.
01:28If you're only working with SharePoint 2007, you'll probably find the
01:32differences are too significant to be practical.
01:36And if you want to get hands-on, you're going to need access to an installed
01:39SharePoint 2010 infrastructure.
01:42As much as possible, I'm going to cover things that exist in all versions of SharePoint:
01:46SharePoint Foundation, SharePoint Server, and SharePoint Server Enterprise.
01:50When that's not the case, I'll point it out.
01:53And as you'll know, SharePoint is a platform that's installed and configured
01:57differently from company to company.
01:59So as we go through this, your experience will almost certainly look a little
02:02different from mine based on your license agreement, the permissions you have
02:06in your organization, and the SharePoint features your system administrator may
02:10have enabled or disabled, but the core of what we're going to explore should be
02:14very similar.
Collapse this transcript
1. Getting Started
SharePoint Designer 2010 overview
00:00If you've used SharePoint for any length of time at all, you'll know there is a
00:04lot you can do with it just using a web browser.
00:07If you have the right permissions, you can create new pages; you can edit or add
00:11new lists or libraries; you can even create new sites directly from the browser.
00:16And the pages themselves, I can shift into the Edit mode and just directly change
00:21the content of the page.
00:23I can grab images or web parts and move them around.
00:28I can use the ribbon to do a lot of very powerful formatting options completely
00:33within the browser, or even tell it just to forget any changes that I made.
00:39But you can't do everything through the browser, and the things that we want to
00:43do in this course is going to require SharePoint Designer 2010.
00:47Now, while SharePoint 2010 itself is installed on a shared server, SharePoint
00:52Designer 2010 is an application that's installed on your own machine.
00:57It's a free application that you run on your own desktop or laptop like
01:01installing Word or Photoshop.
01:03And once it's installed, instead of opening a SharePoint site in a web browser,
01:07you can also open that same site in SharePoint Designer, and do more with it.
01:11Now, SharePoint Designer 2010 is often a bit weird when you first approach it,
01:16because it's really three programs squeezed into one, and people who use it for
01:21three very big but very different reasons.
01:24One, they use it to change the visual appearance of a SharePoint site:
01:28fonts, colors, layout.
01:30It's not what we're doing here.
01:32Two, they use it to create and edit workflows, define business processes, sets
01:37of rules and task to be automated-- again, not what we're doing here.
01:41Well, three, you can affect the structure of a SharePoint site,
01:45not the presentation, not the colors, not the fonts, but what the site is made
01:50of, creating lists and libraries, add and editing web pages, connecting to data
01:55sources, making the SharePoint site talk to the outside world, and that's what
01:59we're using it for here--
02:01using SharePoint Designer to do customization of SharePoint that simply cannot
02:05be done in the browser.
02:08So if you haven't already installed it, now is the time to find and download it
02:12from the Microsoft Office site.
02:13Just search for the phrase 'SharePoint Designer 2010'.
02:17You'll find both 32-bit and 64-bit versions available for download.
02:23There is no difference in features, but you should download the version that
02:28matches your installed version of Microsoft Office.
02:31If you have Microsoft Office 2010 installed, you can open up say Word, for
02:36example, go to the File section of the Ribbon and click on Help, and you'll find
02:44this Version here that will tell you if it's 32-bit or 64-bit.
02:48Mine is 32, so the 32-bit version is the one that I need to install.
02:54SharePoint Designer 2010 is not backwards compatible and it won't work with
02:58SharePoint 2007 on your server.
03:01Now, if you still have to work with multiple versions of SharePoint, you can have
03:04multiple versions of SharePoint Designer installed, which is fine.
03:08SharePoint Designer 2010 does not override SharePoint Designer 2007.
03:11I still come across people who want to avoid using SharePoint Designer in
03:16preference to using a programming environment like Visual Studio or another web
03:20development tool like Dreamweaver.
03:22And yes, you can do some level of customization using those tools, but not what
03:27we are trying to do here, and you'd be making life very hard for yourself.
03:31There are things you can do in SharePoint Designer in seconds that would take
03:35hours to do any other way.
03:38SharePoint Designer is a program that's built to understand SharePoint, and it's
03:42the simplest way to do many of these tasks, and certainly the couple of hours
03:45you'll spend learning will be more than worth it.
Collapse this transcript
Opening sites with SharePoint Designer 2010
00:00So I have a SharePoint site open in my browser here.
00:03This is just a regular SharePoint 2010 team site from my own SharePoint server.
00:08And if I click on the Site Actions menu, I can see I have a lot of
00:12different options available.
00:13The reason I have all these is because I am a site collection administrator of
00:18this site collection, and that's a good permission level to have when working
00:21with data-driven pages.
00:23SharePoint, of course, cares deeply about permissions, both in the browser and in
00:28SharePoint Designer.
00:29Now, we get to any SharePoint Site by having the URL--the address of that
00:34site--and that will be the same for SharePoint Designer, so we need the address of the site.
00:38But as you know, individual SharePoint site URLs can get pretty long,
00:41so the simplest way to find a short address of the current site without all the
00:45extra library and page URLs is just hover of the top-level breadcrumb here and I
00:50can see that down on the lower-left part of my status bar that the address is
00:55ldcsharepoint.com--which is my SharePoint Server--/sites/team.
01:01You might have a shorter or longer address.
01:03I'm going to just copy that as a shortcut, and I have two options basically to open this site.
01:09If I'm already in the site in the web browser, I could just go to my Site
01:14Actions menu and select the option that says Edit in SharePoint Designer.
01:18If I wasn't in the browser and I just wanted to do it directly, I go and find
01:22SharePoint Designer, which I have installed over here.
01:25I'll find it under the SharePoint section,
01:27although to make it quicker to get to, I'm going to right-click and pin it to my Start menu.
01:33So I'll open it up.
01:34Now unlike before, in this 2010 version of SharePoint Designer, we no longer
01:39have options to make regular web sites or individual pages.
01:43From now on, the unit that we work with is a SharePoint site.
01:47On the right-hand side, I can even see options to create new blank SharePoint
01:51sites or new team sites, but most of the time we'll be working with an existing one.
01:56So I'm going to click the button that says Open Site and paste in the address
01:59that I copied and click Open.
02:04After I've connected to the site once, it will save it as a bookmark in
02:08SharePoint Designer.
02:09And SharePoint Designer will take a few seconds to talk to SharePoint to get
02:12information about the site.
02:15And if you need to provide a username and password when you're viewing the site
02:18in the browser, you'll probably need to do so in SharePoint Designer, too.
02:22So I'm now connected to that SharePoint site.
02:26And here's an important concept: having SharePoint Designer does not magically
02:30give you any permissions you didn't already have.
02:32If you couldn't access the site in a web browser, you won't be able to access it
02:36in SharePoint Designer.
02:37If you can't make changes to it in the web browser because you don't have
02:41the right permissions, you won't suddenly have permissions when using
02:44SharePoint Designer.
02:46Now of course, if you don't have the right permissions, it will be obvious.
02:49So if you need to have them elevated, contact whoever gave you access to that
02:53site in the first place.
02:54So we're looking here at the SharePoint Designer 2010 home screen.
02:59Now if you've used SharePoint Designer 2007, you'll see that while this
03:03might have the same name,
03:04it's a very different application.
03:06In the past, SharePoint Designer would pretend that your SharePoint site was a
03:11regular web site and open up with a list of folders and files,
03:15but now with SharePoint 2010, this feels like a SharePoint-focused program, not
03:20a web design application.
03:21So it doesn't show you some fake representation of your site;
03:25it tells you what this site is made of.
03:27The main section over here is this navigation section, and it's really showing
03:32you the building blocks here,
03:34the lists and libraries in this site, the workflows in this site, the content types.
03:40Notice that as I click around, the ribbon at the top of the screen is changing.
03:44If I select Lists and Libraries, I have option to create custom lists and new
03:49SharePoint lists or document libraries.
03:51If I select the Workflows option, we get, not surprisingly, ways of creating new
03:55list workflows and reusable workflows.
03:58And I'll see that on throughout the other options that I'm selecting.
04:02Now, clicking the icon at the top, which for me says LDC Team, that's just
04:06the name of the site,
04:08the title of the site.
04:10And that takes us to the top-level information and settings of the site.
04:14We can even here add subsites or add users and groups.
04:18Now some of these options will actually take us back to the browser.
04:21If I click the Administration Web Page for example, it's going to open up to
04:25the same page I'd get if I had selected Site Actions, Site Settings using the web browser.
04:31Same thing with the Recycle Bin option;
04:33it will just take us to the Recycle Bin page in the browser tool.
04:37And there is quite a bit of overlap between SharePoint Designer and the browser;
04:41you can do many things in both places.
04:43I tend to stay in the browser for things I can do in the browser and just use
04:47SharePoint Designer for the deeper tasks, but that's completely up to you.
04:50Now if you are coming from SharePoint Designer 2007, the closest thing to what
04:55you're used to is probably the All Files section here.
05:00Selecting that will give me a top-down folder-style view.
05:05We'll use this from time to time, but I don't really use it unless there's no other option.
05:09It's much friendlier going through the more specific options above it.
05:14So we will get deeper into SharePoint Designer as we go, but we're now connected
05:18to a SharePoint site, and this is what we're going to use to create our
05:22data-driven web pages going forward.
Collapse this transcript
Creating new pages
00:01So how do we make new web pages in SharePoint Designer?
00:04Well, there's a question.
00:05Like many things in SharePoint, it depends.
00:09And the way to understand that is to first think about how we make new pages
00:13just using the web browser.
00:15Take a classic SharePoint team site.
00:17If I was in the browser and I used the Site Actions menu and said that I
00:21wanted to create a new page, notice that it says, "This page will be created in
00:26the Site Pages library."
00:28Now the Site Pages library is the default location for new pages in most
00:33SharePoint 2010 sites,
00:35and this is actually the location we'll be primarily using in this course.
00:39I'm going to cancel out of this because I'll see that in my site here I do
00:43actually have a link to a Site Pages library.
00:46This is what's called a Wiki Page library;
00:49it's a new kind of library for SharePoint 2010.
00:50But don't get too worried about the name;
00:53you don't have to be making a wiki here.
00:55It's really nothing special.
00:56It's a regular SharePoint library; it's a container;
00:59it's a location for new pages to go so they just don't end up all over the place.
01:05And because this is the default location for new pages, if I have this site open
01:09in SharePoint Designer, I can see that I actually have a shortcut to it.
01:13Site Pages is showing up on the left- hand side as one of the site objects,
01:18which is showing me the same two pages that I could see if I was looking at it
01:21through the browser.
01:22And when I am in this Site Pages location, the ribbon has changed, and up here
01:27I have a couple of buttons here.
01:29I have Web Part Page and Page;
01:31both would allow me to make new web pages.
01:34But most of the time, in fact, almost all of the time,
01:36I'll be using the Web Part Page option.
01:40If I click this one, I'll get a dropdown box, which is giving me a choice of
01:43predefined layouts, different columns.
01:46The most simplest one is the first, Full Page, Vertical, but we have other
01:50classic SharePoint layouts, such as the Left Column and the Body and the Header, and so on.
01:56Most of the time, we'll be using the larger one to give us most flexibility to
02:00create our data-driven pages here.
02:03So I choose the first one and it's going to ask me to give it a name.
02:06It starts out with Untitled_1.aspx;
02:09you can call it anything you want.
02:11I'm going to call it SimpleExample.aspx.
02:15The .aspx is important.
02:18That's telling SharePoint that this is an ASP.NET page, and that's the
02:22technology that SharePoint is built on.
02:26So we rename that, and I'm going to open it and edit it.
02:29And it's really two stages here.
02:31If I single-click it once, what it'll do is it will take us to the classic
02:35SharePoint Designer Information page here, where you can do things like change
02:39the title, see who it was created by, and down towards the bottom, we have a link
02:43to edit this file, and we open up the page in Edit mode.
02:48Now I can see that I don't have a blank page here.
02:51In fact, I have the Site Actions entry and LDC Team, which is the name or the
02:56title of this team site.
02:58And that's because choosing any of the Web Part Page options still gives us an
03:02overall look and feel from the default master page for the site,
03:07and the master page is what describes the overall look and feel of a SharePoint Site--
03:12the fact that it's got navigation along the top, the color scheme, and so on.
03:16That's not directly editable here, which is why I'm getting a No Entry sign as
03:20I mouse around. There's only small places that I can actually click in to add my own content.
03:26As this course isn't a branding course, we won't be messing with master pages here,
03:30so I'll just be accepting what's given to me every time;
03:33we'll be playing around with the content that we can affect and we can edit.
03:37I'm going to go back to the Site Pages entry here by clicking it again.
03:43Now what that seems to have done is make our Edit Page go away, but if you look
03:47at the top of the main section here, we have a Tab-based environment,
03:51so I can actually flick between the page that I'm editing and the Site
03:55Pages Library view.
03:58When I'm in this, I can see that the other options under here are a page, which
04:02gives me HTML or ASPX, but these are pretty much if you want to completely write
04:07them from scratch yourself. We don't;
04:10we're trying to get SharePoint to do as much as possible for us and just build
04:14on top of that, so we won't really be using these.
04:17Most of our pages will be created as Web Part Pages in the Site Pages Library,
04:23but there is another thing that you might often see.
04:26If I go back to my browser and this time I'm going to go and look at a Portal Site here.
04:31Now this site has a feature turned on called the Publishing feature.
04:35And if your site has that, what you'll find is when you create a new page
04:40that the default location for this is not the Site Pages library anymore, but the Pages library.
04:46Now this sounds like a small distinction, but it really isn't.
04:49This library, the Pages library, is much less useful for us because this
04:53location is tightly controlled for enforcing a very formal publishing layout on the page.
04:59And typically, if we make a page this way, we won't be allowed to edit these
05:03pages in SharePoint Designer.
05:04Let me show you what I mean.
05:05So if I select this site and I'm going to come to my Site Actions menu and say
05:10Edit in SharePoint Designer, and that's actually opening up another copy of
05:15SharePoint Designer connected to this Portal site.
05:19If I look down here on my taskbar, I can see I actually have two copies of
05:22SharePoint Designer open, one to each different site here.
05:26So do pay attention to that because it's an easy mistake to make to suddenly
05:30change the title of the wrong site.
05:31But in this new site, if I were to look at my All Files layout, because I have
05:37that feature enabled, I have a whole lot more stuff going on, including that
05:42Pages library that was mentioned.
05:44Now the reason I'm showing you this is that sometimes you might run across it by accident.
05:48You'll jump in to a library and you'll see a page like an ASPX page and you
05:53think, okay, I'll take a look at this one and I'll edit it,
05:56and you'll get this message that this page cannot be edited in SharePoint Designer.
06:00And this is basically saying. "I'm sorry!
06:02There's already a very formalized look and feel to this page.
06:05I'm not going to let you do that."
06:07So that's why we are going to be making almost all of our pages in the Site
06:12Pages library, which is the typical SharePoint 2010 place to put them.
06:17Now you do have a third option.
06:19And particularly those of you who are used to SharePoint Designer 2007, you
06:23might jump in to say the All Files view of your site and just right-click and
06:30say I want to make a new HTML or ASPX or CSS page here.
06:34And you can do that, but it's a very uncontrolled way.
06:38So I recommend putting your stuff in the Site Pages library, and that's what
06:42we'll be doing going forward.
06:45Now what if you don't have a Site Pages library, and that is actually possible.
06:49Let's say you started off with a blank site or perhaps a site that was
06:53upgraded from SharePoint 2007, so I'm looking at a new site here which is completely blank.
06:58And if I look in my Library section, I have no Site Pages Library.
07:02Well, what do I do here?
07:03We can get this by making sure that a particular feature is turned on for our site.
07:09I'm going to go into the settings for this site, and look at the Manage site
07:14features area, because what's happening here is that in most SharePoint 2010
07:19sites, they have a feature turned on called the Wiki Page Home Page.
07:23If you read that, it says this site feature will create a wiki page and set it
07:27as your site's homepage.
07:28This means create the Site Pages library and point the homepage of this site
07:33to a page in there.
07:34I'm going to activate that here, and what that actually means is when I go to
07:38the homepage of this blank site, what was blank a few minutes ago, I can see up
07:42here in the URL that I have a Site Pages library and I'm looking at the
07:47homepage at the root of it.
Collapse this transcript
Working with existing lists and libraries
00:00This course is all about making data-driven web pages in SharePoint. But let's face it,
00:06one of the benefits of SharePoint is that we often don't think about web
00:09pages all that much.
00:10What I mean by that is if I say that I want a contacts list on a web site, I
00:16simply create that list.
00:18I go into the Site Actions menu, I create the new list, I select one of the
00:22templates, or I define my own, and I give it a name.
00:25SharePoint will take care of generating the web page to display that list, the
00:30web page to add an entry, the web page to edit it,
00:33as well as taking care of all that information in its own database, and it will
00:36do that automatically.
00:38And that's because SharePoint is already focused on creating web pages that show
00:43data, and that can help us a lot.
00:45Now, we have this key phrase when we're working with data in SharePoint and in
00:49SharePoint Designer, the idea off a data source.
00:52And all that really means is exactly that, a source of data, a location of
00:56data. That data could be tiny, that data could be huge.
00:59It could be from an Oracle Database, SQL Server, Access, a web service, an
01:04XML file. It could be on a same server, could be on a server on the other side of the world.
01:09It's all just data sources.
01:11Now here's the thing.
01:12The SharePoint lists and libraries that all our sites are made of are
01:17automatically considered to be data sources in SharePoint Designer.
01:21In fact, if I select the Lists and Libraries option here, I can see my list.
01:25I can my libraries.
01:27If I click the option that says Data Sources, it looks pretty much
01:31identical because all those lists and libraries are already data sources in
01:36SharePoint Designer.
01:37What this means is we can use the existing SharePoint lists to experiment with
01:41creating custom pages and playing around with formatting in web parts without
01:46having to worry about database connections and authentication and credentials
01:49and all that stuff until we're ready.
01:51So working with the existing lists and libraries in SharePoint is a great way to
01:54get started with this, so let's do it.
01:57What I'm going to do is make a page here and tell it to show some data from the
02:00existing SharePoint list.
02:01So I'm going to jump to the Site Pages section and tell it to create a new Web Part Page.
02:07I'm going to select the simplest option again, just the single column.
02:13I'll give this a name of SimpleData.aspx.
02:16Again, be careful that you do give it the .aspx suffix--that's essential.
02:21Single-click it.
02:22We jump through to the Settings page;
02:24this is where I might change the file name later, if I needed to.
02:29I'm ignoring everything else here;
02:30it's just simply telling me that it's using the same permissions as the parent
02:33of the site, which is fine. I'm going to select the Edit file link.
02:37And like many web design tools, you have different ways to edit these web pages.
02:44Down towards the bottom in SharePoint Designer here, I'll see this
02:48Design, Split, Code button.
02:51This gives you the choice of the Design mode, which is the kind of the what you see
02:55is what you get view.
02:56You can switch to Code view and actually manually start to edit the tags
03:01that this page is made off. Or you can do a Split view which is a little bit in between.
03:08Now, if I were doing a branding course and really focused on customizing the
03:12HTML, we might spend a lot of time in Code view.
03:15But to be honest, I'm going to prefer to spend as much time as possible in
03:18Design view in this course.
03:20Even if you're super-comfortable working with HTML, you'll find that it's much
03:24easier to work with the SharePoint-specific parts using the Design mode.
03:28Again, as I mess around, I get this No Entry sign.
03:31That's because most of what we see here is coming from the master page, which
03:35describes the general look and feel of the site.
03:37And with this Web Part Page, there's really only two areas that I can edit.
03:44There's an area up here in the top part of the page, and then there's this main section here;
03:49this is the one I'm really interested in.
03:52This is the main placeholder for my content.
03:55This is the container that's just waiting for me to fill it out.
03:58I can click in and I could start typing anything that I wanted here, but that's
04:05not really what I'm wanting to do here.
04:07Now, if you don't want to get confused with the rest of the master page, one of
04:11the things you can do with this main section selected is over here on the right,
04:17you have the little arrow glyph, and one of my options here is Zoom to Contents.
04:22What this allows us to do is just focus on that specific container that we're
04:27filling, without seeing any of the extra navigational stuff.
04:30I don't really need to do that right now, but that's fine.
04:33Zoom to Contents is just simply a toggle, so I'm going to click Zoom Out and go back out here.
04:38It doesn't change what you're allowed to do;
04:40it just changed what it looks like, Of course, I don't want a page with
04:43fixed static content.
04:45I don't want to type anything manually in here.
04:47I want to show some dynamic data.
04:49So, I'm clicking in the section and then up on the ribbon, I'm going to click the
04:54section that says Insert and we're switching to this Insert part of the ribbon.
04:58I can insert some classic things like a table and a picture, but it's over in
05:02this section that's more tempting.
05:04Now I might rush ahead and see Data Source and think, ahh,
05:08that's what I want, but no,
05:09this isn't it right now.
05:11I'm more interested in this section, the Data Views and Forms area.
05:16These are the pieces that show data.
05:18I can mouse over each of these to see a little bit more information.
05:21The Display Item Form inserts a form that displays the data for a single item, okay.
05:27And we've got a New Item Form and an Edit Item Form.
05:30But really, this one here is the one that should be flashing in twice the
05:35size of the others;
05:36this is the most important one here, the button that says Data View,
05:41inserting a view that displays data from a data source.
05:45Remember that our SharePoint lists and libraries are already defined as data sources.
05:50We don't need to describe anything more about them.
05:53So when I click this, it's actually saying okay, where's the data coming from?
05:56It's showing me the lists and the libraries that it knows about.
06:00I do have an option for More Data Sources, but we'll see that later.
06:04Now I've added a few tasks to my Task list on this site, so I'm going to pick that one.
06:09And what we're doing here is SharePoint Designer is adding a web part, a
06:14reusable, customizable, self- contained, intelligent chunk of content
06:20that, in this case, is talking to the database that stores the Task list for this site.
06:25And it's actually reading that data right now from the Task list.
06:29Now the web part that we've just added has the rather long-winded name of the
06:34XsltListViewWebPart, and you can see that, or least at the start of it, on the
06:39handle of the web part here, XsltListViewWebPart.
06:42This is a new web part in SharePoint 2010.
06:45In SharePoint 2007, there was something called the data view web part, which
06:48was similar, and that still exists, but it's been replaced by this
06:52XsltListViewWebPart, which is a lot better and a lot more customizable, as we'll see shortly.
06:58Now what I'm going to do is just save this page.
07:00I'm going to jump up to the floppy disk icon at the top here and click Save.
07:05And then I'd like to actually preview this in the browser and take a look
07:09and see if it works.
07:10In fact, the shortcut here is just hitting the F12 button.
07:14And I can see that this is already working.
07:15It looks like classic SharePoint.
07:17I can actually see these options here,
07:19I get the dropdown arrow.
07:21In fact, it looks kind of like the page I might expect to see when I'm
07:25looking at this list.
07:26I don't have the Quick Launch bar on the left, but that's just the default way
07:29that site pages are created.
07:32And we're getting all this extra stuff, all the navigation, the search box, the
07:36title, the Site Actions menu, provided by the master page, which is why I'm not
07:40going to touch that.
07:42Closing that down, I'm going back into SharePoint Designer.
07:44Now it's easy to think of web parts as kind of small and insignificant, kind of
07:49boring, kind of fixed, but make no mistake.
07:51This XsltListViewWebPart is deeper than most, if not all of them.
07:56It's not some restricted feature;
07:58in fact, this is the same web part that you've been using, whether you knew it
08:02or not, on almost every standard list and library page in every SharePoint 2010 site.
08:07And as we'll see, it's a lot more powerful than most people think it is.
Collapse this transcript
Editing Data View Web Parts
00:00So I'm going to take this standard XsltListViewWebPart and do some
00:04customization of it.
00:06When you're editing a page in SharePoint Designer, like in most web-editing
00:10tools, it's very sensitive to what you have selected in the document and
00:14where your cursor is.
00:15And if I want to customize the web part that's down here, I want to make sure
00:19that my cursor is not positioned in some other section.
00:22Now if you've done any web page editing, you might be used to using an
00:27environment with a Properties pane or Properties panel, and we have one here
00:31in SharePoint Designer.
00:32If I go to the View section of the ribbon, I can open it up by selecting the
00:36Task Panes section, which is basically all the properties panels that can show
00:40up on the right-hand side, and I'll select Tag Properties.
00:44Right now, I am showing Data Source Details as well.
00:47I'm going to close that because we don't need it right now.
00:50So this is the view you'd often see in a lot of web-editing environments and
00:54as you click around, what you see here is going to change based on what you have selected.
01:00If I want the properties for the web part as a whole, I make sure to grab the
01:04handle at the top of the web part and just select that.
01:07But for we want to do, this Properties panel is not all that helpful.
01:13Now if you're someone who likes your right-click options, you might try
01:16right-clicking the ListViewWebPart, and you'll see that there is a
01:18Properties option there.
01:19That just opens up the tag properties that we're already looking at.
01:23We've also got an option called Web Part Properties, and clicking that will open
01:27up a window by itself.
01:29Now these are the same properties
01:30you can edit going through the browser, simple things like the title of it and
01:36what the Chrome State is.
01:38And that's not what we want here either, in fact; neither of these are the
01:41changes that I want to make.
01:43Now when you're editing the XsltListViewWebPart, you start up here on the ribbon.
01:50When I have this web part selected, I get a new section on the ribbon called
01:53the List View tools.
01:55That section would disappear if I was clicked somewhere else. Making sure that
01:59I'm in the web part itself, I get it.
02:01Now I'm not going to go through every single option here--
02:04I do invite you to explore them--but I'm going to cover some of the most common.
02:08It's broken up into four sections.
02:10The Options part, the first part, is the most common initial settings, and I'll
02:15come back to that in a second.
02:17If I click through to the Design option, this lets me change some examples on presentation.
02:22So what is the layout?
02:23If I am looking at multiple rows of data, which I am, can I change that layout
02:28by clicking one of these buttons to give me say an alternate row style or
02:32shifting into a different look or shifting into multiple, almost index cards.
02:38So those are few sections there.
02:40We'll see later how we might define our own.
02:43I'm going to switch back to the default view, which is the far-left one.
02:47Jumping into view the Web Part section of the ribbon, these are actually very
02:51similar to the Web Part Properties.
02:53There are things like the title and the Chrome State, so I'm going to leave that alone.
02:57And on to the fourth one, we also get a Table option, because this is giving us
03:02tabular data, so it's being presented in an HTML table of rows and columns.
03:08Again, very, very sensitive to where you have it selected in that web part itself.
03:14So you'll see a lot of the table options will gray out if you're not selected
03:19in the right place.
03:21I'm going to jump back to the first section and make a couple of changes to this web part.
03:25I'm going to click the button that says Add/Remove Columns because right now I
03:31don't need to see attachments, or I don't need to know what type this is.
03:34So I'm going to click that, and it's telling me that these are the Displayed
03:38Fields right now in the web part.
03:39I'm going to select Attachments and Remove it.
03:42I'll also select Predecessors and Type.
03:46Click OK and it will redraw the web part with my changes.
03:52If I wanted to, I could click the Filter button and define some information
03:56about the items I'd like to exclude or include.
04:00I can also click the Sort & Group button, choose to order these in a particular
04:04way, or perhaps I'm going to select Status and click the button to show the group
04:10header and group these tasks together by the status that they are assigned to.
04:15And SharePoint is smart enough to generate the interface around that.
04:19Now, these last couple of options are quite similar to options you have when
04:23defining a view in SharePoint using the browser,
04:26but we do have more options.
04:28For one, what I can do is add this button here and apply conditional
04:33formatting, the ability to change the style, the look of a cell or a row based
04:40on some conditions, some rules.
04:44So let's say I wanted to highlight a row when it was considered an overdue task
04:50that hadn't been started.
04:51What I can do, and I'm just going to do very quickly.
04:53We're going to get into conditional formatting later on in the course, but to
04:56give you an idea of what it can do, I'm going to select somewhere in this row.
05:01It doesn't really matter which row you select.
05:03You just have to select a row or column to tell SharePoint yes, I'm wanting to
05:07edit a row or column.
05:09And it says, what do I want to do?
05:10I'm going to select to format the row, and it's asking me for the rules.
05:14What are the rules I want to describe?
05:16It knows what data is available, so I'll say that I'm interested in when the
05:22Status is equal to Not Started. It's not enough.
05:27I want to also add a clause to say when the Due Date is Less Than, and we've an
05:34option here for Current Date, which is fine, and after that, I'm going to click
05:38the button to say Set Style.
05:40So those are my rules, those are my conditions, and if they're true, then what?
05:44Well, I could change the font.
05:46I can change the border.
05:47I can change the block style.
05:48These are all CSS styles.
05:50I'm going to do something fairly simple, which is just change the background color.
05:54So selecting the Background category, I can choose from the colors up here.
05:58If I don't like the ones being shown, I can click the More Colors button and
06:02come down, and let's say let's choose that one. That will do the trick.
06:07It's little ugly, but I just want to prove a point. S o we'll click OK, and it
06:12doesn't immediately seem to be showing something.
06:14I'll occasionally get this.
06:15Over here, we've got the Conditional Formatting panel here
06:18that's actually saying, we want to apply the style.
06:21We've got the preview of the style.
06:22When the State Equals "Not Started" and Due Date Less Than, double quotes. I might have hit something there,
06:27so I am going to edit this condition, click the little dropdown here,
06:32click Edit Condition, and yes, Due Date was meant to be Less Than Current Date,
06:36so I'll try and reselect that and click OK, and then there we go.
06:39Now what's happening here is it's highlighting a few too many things for me,
06:44because it's highlighting not only the one that has a due date of less than
06:48today, but it's also highlighting the ones that don't have any due date at all.
06:51Now later on the course, we'll get through how to start creating multiple levels
06:56of conditions so we could exclude those.
06:58But you should be able to get kind of an idea of what you can do through this.
07:02So I'm going to save this page again by clicking the floppy disk icon, and then
07:05I'm going to preview it.
07:07Again, I could do that either from the Home menu--I have got an option here
07:11called Preview in Browser--or if I'm in the page itself, I can just hit F12 and open that up.
07:19We've got the Grouping options that we described by grouping by status, and I
07:24can collapse or expand these if I want to.
07:27And I also have the rather ugly conditional formatting going on here.
07:31I'm just scraping the surface here.
07:33We'll get into much more significant customization later, but it should give you
07:37a taste of how we can get started with it.
07:39Now of course, if you're thinking that you wouldn't go to this trouble to create
07:42a page just to show items that can already be seen in an existing SharePoint
07:47list, well you're completely right.
07:49But it's a great way to go through this process of creating pages, of adding the
07:54web part, or customizing the web part, without throwing database connections into
07:58the mix, but we'll do that in a moment.
Collapse this transcript
2. Managing Data Sources
External data sources
00:01So let's get into why we're here.
00:02We want to connect to some external data, data that is sitting outside of the
00:06current SharePoint site.
00:08Now, you are ready to get going, but I need us to slow down for a second and
00:10think about what we're doing, because there are two very important questions to
00:14ask before we jump in. One, why are we doing it? And two,
00:17where is your data?
00:19And when I ask why are you doing this, I mean what's the reason in each case?
00:24Is it all a one-off, ad hoc need?
00:26Say you just need a single web page on a single SharePoint site to connect to
00:31some orders database and show a list of recent orders.
00:34Now this would take the shortest time to do, but it is a one-off.
00:38It would be created and customized on a single page, and it's not a reusable
00:42solution, though this is often fine. But another scenario might be that you want
00:47to define a connection to an external data source because you want something
00:51that behaves more like a regular SharePoint list. You want to show it in
00:55multiple pages, in multiple web parts, even in multiple sites.
00:59You want to reuse that data across different lists and libraries.
01:02You might even want that data searchable in SharePoint, and we can do this too.
01:07It is more flexible, but it's also more complex to set up.
01:12Now, in this course, we're going to do both, but you want to be specific when
01:16you're choosing your method, and think about what you need in each business case.
01:21So then there is question two, where is your data?
01:24And the simplest answer here would be, your data is in a database somewhere.
01:28But it could be from a web service, or it could be from an XML file.
01:33These are the external sources that SharePoint can deal with, and we'll
01:36cover them one by one.
01:38Regardless, your main problem is always going to be security. It won't be about
01:44getting the data onto your page or customizing it to show what you want;
01:48it's being allowed to get to that data in the first place, because most data
01:52sources, except for the most casual, are going to need some kind of credentials.
01:57Let me show you what I mean by talking about connecting to a database.
02:02Scenario number one:
02:03Forget about SharePoint for a second. Imagine that we log on to our PC in the
02:07morning, and we open up an installed application on our desktop machine.
02:12It's going to connect to a database on a remote server.
02:16The database is going to ask who we are, and we will supply some credentials, either
02:21by typing in a user name and password or by automatically using the same user ID
02:26and password that we logged on to that machine with.
02:28The database checks them and says, "Okay you're Simon.
02:31I know you. Come on in. Fine."
02:34Now, we want that same data, but we want it on a SharePoint web page.
02:38It doesn't sound like a big problem, but the thing is, it's not us talking to
02:42the database anymore.
02:43What we're going to do is we'll open up a browser on our PC, and we will request
02:48a page from a SharePoint server, and we'll pass SharePoint our credentials.
02:53Now, SharePoint says, "Hang on. Before I send this page to you, I meant to fill it with
02:57data from the database," and it connects to the database, but the credentials its
03:02passing is not our identity anymore;
03:05it's the SharePoint Server identity. And if the database doesn't have the
03:09knowledge of the SharePoint server it's going to refuse the connection.
03:13Now sure, this is a fixable problem, and we actually have a few ways of dealing
03:18with this, but they are all more about your own organization's rules than they
03:22are about SharePoint. One,
03:25what we could do is we could add a specific account in the database just for the
03:29SharePoint server, and we'll tell SharePoint to always use those credentials,
03:34and that's a nice easy fix.
03:35It can be done very quickly, but it has its own problems,
03:39because now everyone viewing that page in SharePoint is effectively using the
03:43same account to connect to the database. Well, that's not a problem by itself, but
03:48if you require auditing and logging, you're not going to know which individuals
03:52were viewing or changing that data. Option two,
03:56we can do what's called pass-through authentication.
03:59When we log on to SharePoint, we're telling SharePoint to take our credentials
04:03and pass them right through to the database to connect to that external system.
04:08This sounds like a great solution, but it's difficult to do, and the problem has
04:13nothing to do with SharePoint.
04:14It's that machines in general aren't allowed to just grab identities and pass
04:18them around because this would lead to all sorts of security problems.
04:22And a third issue is that sometimes we use different sets of credentials to
04:27access different databases, or a external line of business systems, and we have
04:32multiple sets of credentials for each individual, and throwing this into the mix
04:36is going to further complicate things.
04:38Now as we'll see, SharePoint can deal with all of these situations, but you have
04:45to have a pretty good idea of what the rules of your external system are before
04:48you start to connect to it.
Collapse this transcript
Reading data from an XML file
00:00Our first external data source is the simplest.
00:03It's probably the one you'll use least, but it is a useful one to know, and
00:07that's using an XML file as your data source.
00:10The most common reason here is that some external system you have exports an XML file as output,
00:15and because XML isn't all that friendly to read for human beings, you want to
00:20show that on a SharePoint web page.
00:23So I have an XML file here that I've uploaded to my Shared Documents folder,
00:28which is one of the easiest ways to let SharePoint get to that.
00:31I'm going to use this one.
00:33Let's define this as a data source.
00:35I'm going to open up SharePoint Designer and connect to that current team site.
00:40Once we've connected, I'll jump to the Data Sources section in the Navigation
00:44pane, and that will update to show me the kind of data sources I can describe
00:49here. I'm going to select XML File Connection, and it asks for the
00:53location of this XML file.
00:55Now, you might be tempted to say paste in the address of something in your My
00:59Documents folder, or anywhere on your C drive, but that's not going to work
01:03because the location needs to be accessible by the SharePoint server.
01:07So the easiest way is to just put that XML file inside SharePoint, but you can
01:12use a network share too.
01:14I'm going to click the Browse button, and it's going to open by default to the
01:18root of my SharePoint site, where I can see folders that represent my document
01:22libraries and lists and so on.
01:24I'm going to jump into the Shared Documents folder and select books.xml. So it
01:34stores the location.
01:36If I was connecting to a separate machine, there is a Login tab where I can
01:40provide different credentials for authentication.
01:43I'm not going to do that here, and we'll talk much more about credentials later.
01:48And click OK. The data source is created in the Data Source section underneath my
01:53existing lists and libraries.
01:55So I'm going to jump over to my Site Pages section on the Navigation pane and
02:00create a new web part page, selecting once again just the simple Full Page entry.
02:06I'll call this one xmlExamples.aspx,
02:11single-click to see the Information page, and then select the Edit File button
02:15to jump into Edit mode.
02:17I'm going to switch completely into Design view here.
02:20Now if you don't have this pane open on the right-hand side, this is the Data
02:25Source Details pane, which you can get from selecting the View section on the
02:30ribbon and selecting the Task Panes > Data Source Details. That can just toggle on and off.
02:36I don't find it the most reliable panel in the world; sometimes it gets a little
02:40bit out of date with what it should be showing.
02:43Right now, it's looking okay because we haven't got anything to see.
02:46So I'm going to jump over to my Insert section here, jump to Data View, and I'm
02:52going to scroll down, find my XML file books entry, and select that.
02:56Now, you'll sometimes have this happen where you're trying to insert a data view
03:01and you get nothing; nothing seems to happen.
03:04In fact, that's what's happening to me right now.
03:05Well, there is an alternate way we can go around this, which is, I can manually
03:10say well, first let me just enter the data source itself.
03:13So I'm going to jump over here and select the books data source and then
03:18immediately go back and try that one again, and that seemed to refresh it
03:24correctly and actually dump it in there.
03:26We can even see that the data source details entry has updated as well.
03:30This allows you to browse through the different rows of the data that you are connected to.
03:35And if I hadn't already got a web part over here, I could select the fields
03:40that I wanted and just Ctrl+Select to select multiple and drag them across into the window.
03:45That would work just fine as well.
03:47So I'm going to save that, and I want to test this page.
03:51Again, either if you go to the Home section of the Ribbon and select to Preview
03:55in Browser, or with anywhere in the page selected, I can just hit F12 to open it
04:00up and see that yes indeed, it does seem to be rendering out some details for us.
04:08Making that XML a bit more readable, I can still go back in here and with the
04:14web part selected, I do have options that I can remove columns. For example, if I
04:19don't want to see the ID, I can take care of that.
04:22And I can even turn on the ability to do inline editing.
04:27I have the choice here you to Show Edit Item Links, and Insert Item Links,
04:30and Delete Item Links.
04:32Let's just select Edit for right now.
04:35Click to save this one, and I'll test it again by hitting F12.
04:38It's not the most elegant interface in the world, but we can hit the Edit link
04:44beside one of these entries and it jumps into this Edit mode here, where we could
04:50change one of the titles and come back over to the left where I have the Save
04:55link and save that right back.
04:57And that is actually changing the XML file in our Shared Documents library.
05:03It's far more likely that you're just wanting to actually show that data, so I
05:07can go back and untoggle that Edit Item Links and save it again.
05:12Now, it's actually using a different web part this time.
05:16If you look, it's not the XSLTListViewWebPart anymore; it's
05:20the DataFormwebPart.
05:22It's not as quite as powerful as the XSLTListViewWebPart we used previously,
05:27but it will do fine here, and most of the options that we've explored so far we
05:31can do just the same, things like working with the general design layout and the
05:36title of the web part and paging options and editing options and so on.
Collapse this transcript
Reading data from an external database
00:00Next up, probably the most common external data source, working with a database.
00:05So I've opened my site in SharePoint Designer.
00:08I'm going to jump across to the Data Sources section and up on the ribbon, going
00:13to click to create a new database connection.
00:16The only button it's offering me is one to configure the database connection,
00:20so we'll pick that.
00:21And what it's first going to ask for is the name of the server and the name of the provider.
00:26And what does this mean? Well, the provider is describing what kind of data we're talking to.
00:31And by default, it's selecting the .NET Framework Data Provider for SQL Server,
00:36but in the dropdown is one for OLE DB;
00:39you may see more if your system administrator has installed different ones.
00:45I do want to talk to SQL Server, so I'm going to select the specific provider here.
00:50But if I'd selected OLE DB, that's more of a generic data provider that could
00:55connect to Access, Sybase, MySQL.
00:58There are many, many databases that will accept an OLE DB connection.
01:03And you can get more specific ones, like Oracle-specific data providers, but
01:07that's not something we can do from the SharePoint Designer side of things.
01:12So in my case, I have a SQL Server machine on the network that's called
01:15dbserver, so I'm going to use that as the server name.
01:19And remember, this must be a name that works from the SharePoint server; whether
01:23it works on your machine is irrelevant.
01:25So if you've got say a local database, like one created in Access, you're first
01:30going to have to move it to a network location, so the SharePoint server can get to it.
01:35So how are we going to connect?
01:36Well, the default option is going to say Save this username and password in
01:41the data connection.
01:42I'm certainly not going to put in my own username and password here, because
01:46this will be saved as part of this page, and it could be obtained by anyone who
01:51can get to it in SharePoint Designer.
01:54What I'm going to do is put in a username and password that I've had set up
01:59in the database specifically for connecting with SharePoint, and it's called SP_DatabaseAccess.
02:08This one I've had set up with read and write access to several databases, but I
02:13could set up an account and just restrict it to be read-only.
02:15It's something to talk your database administrator about.
02:19But what you'll see in a moment is when I click the Next button, it will prompt
02:23me and say, I'm going to save these details in the page itself, just letting you know that.
02:30My alternative is here, and I've got an option here that says Use Single
02:34Sign-On authentication,
02:35but that shouldn't even be here, as single sign-on doesn't exist in this
02:39version of SharePoint.
02:40It was replaced by something called the Secure Store Service, which I'll go
02:44through in the section on business connectivity services.
02:47And you can also import a manual connection string if you need to.
02:52But I'm going to leave this one with my new account that I've had set up. Click Next.
02:56It will give me the prompt.
02:57This will be saved as clear text in the data connection.
03:00Other authors of this web site can access the information.
03:03Now what it means by this is not everybody who can view the SharePoint page will
03:08see that connectivity information; no, they won't.
03:11But if you are an editor and you can actually open the site in SharePoint
03:15Designer and edit this page that we're creating, well, they could see it then.
03:20So I'm going to click OK and give it a section.
03:24It's actually thinking about it.
03:25It's connecting to the server right now, which is why I've got the
03:28little turning disk here.
03:30And it retrieves the list of databases, tables, and views that I can get to.
03:37Now here I've got installed the classic AdventureWorks and even the
03:41old-school Northwind and pubs databases from Microsoft, just to give me
03:45something to play around with.
03:46So I'm going to select from Northwind, because that's a simple one.
03:52It comes back with the tables and views if I have them, and I'll come down to say
03:56Products, and click Finish.
04:00By default, it's going to be retrieving everything, but we do have a button here
04:04to select to only bring back certain fields, so I could select some of these
04:09options if I didn't need them, and remove them.
04:12This table is not very big, so I don't have to worry about it, but as a general
04:15rule, you want to retrieve the minimum possible.
04:19We also have buttons here for filtering and sorting;
04:22I'm not going to do that here.
04:23I could actually do that later on the page if I wanted to.
04:26Bear in mind what we're doing here is describing the data source;
04:30we haven't gone to the page yet.
04:33I'm just going to click OK.
04:35And we now see that we have the database connections for products on Northwind.
04:40Okay, jump across to site pages and create a new web part page.
04:44I think you know where I'm going with this one.
04:46I am going to select the full-page version, and I'll call this the
04:49dbExample.aspx. Jump into that one. Click to Edit the file.
04:58I want to be in Design mode here.
05:00And if you noticed, in an earlier movie, I had said that occasionally
05:05you'll find the Data Source panel over here isn't quite refreshing to show what it should be.
05:11This is the showing the old XML data source here, which is kind of irrelevant;
05:15it shouldn't be doing that.
05:17One of the ways you can make it refresh itself is go over to the View section of
05:21the ribbon and just turn it off and turn it back on again, and you'll typically
05:26find it will refresh and show empty, which is what I'd expect right now.
05:31Again, clicking in the PlaceHolderMain, I'm going to go up to the Insert section
05:36on the ribbon, come down to Data view, and let's see if it's good with inserting
05:40my database connection here.
05:43Thinks about it for a second, and there we go!
05:45We have the web part being inserted.
05:49We have the data source details over here.
05:52I have the ability to change the settings of this web part, change the design
05:57layout, change the table styles of any of the cells or rows.
06:01I'm actually going to leave it as is.
06:04I am going to come along and turn on from the Options part of the ribbon,
06:08the Edit Item Links. I'm going to just save this page and hit F12 to open it up in the browser.
06:17I can see that I can start to move through it.
06:21I can come over to, let's go to the Start of the page and click edit on one
06:26of these links, change the description here, "Chef Anton's Great Gumbo Mix," and hit Save.
06:32And that is writing back to that external database.
06:35It's not importing this.
06:37This data does not exist inside SharePoint.
06:39It's making that connection to the Northwind database right now.
06:43And because my connectivity information allows me to write back to the database,
06:47I can do that here, too.
06:49Now this, of course, is a little bland right now, and the power of the
06:53database, of course, is that these tables that we're looking at here are often
06:57related to each other,
06:59connected to each other.
07:00And we can connect the data here in SharePoint, both on single pages and
07:05across multiple pages,
07:06but before we do that, we need to cover another couple of data sources and talk
07:10a little bit more about credentials.
Collapse this transcript
Reading data from a SOAP-based web service
00:00So, another option for external data is to get it from a web service.
00:05A web service is just a location on the web.
00:07It has a URL, just like a web page.
00:10In a sense, it's an address on the web designed to be read by machines,
00:14rather than human beings,
00:15and so SharePoint can reach out to another location on the web and grab data
00:19from it, rather than grabbing a formatted web page.
00:22There are two kinds of web service connections you can make in SharePoint: a SOAP
00:27Service and a REST Service, which also allows RSS feeds.
00:31These days REST web services tend to be more popular, but I'm not going to get
00:35into exploring the underlying technology here, for the same reason I wouldn't be
00:39debating different databases.
00:41If you have to connect one, you have to connect to one.
00:43It will be apparent whether it's SOAP- or REST-based.
00:47And the few occasions where I have the choice of SOAP and REST, I'll pick REST
00:51because they are usually more straightforward. But let's do the SOAP Service one too.
00:55If I click this, the most important thing it's asking for here is the address of
01:00what's called a web services description language, or WSDL, or WSDL file.
01:06And what does that mean?
01:07Well, I do actually have the address of one.
01:09I'm going to go over to a regular web browser and paste it in, and we're going to
01:14the WSDL file for a weather forecast web service.
01:19And this is a file that you really don't want to have to read yourself.
01:22It's basically not designed for human beings.
01:25It's a very descriptive piece of information about what this web service does,
01:31and it's designed for machines.
01:33So taking that address and feeding that into this Data Source Properties of
01:38SharePoint, we can paste in the WSDL file and click this button that says Connect Now.
01:45SharePoint reads that file, and it's perfectly happy to read it, and it's actually
01:51getting some information about what that web service does.
01:54It says that there is actually two Operations here: GetWeatherByZipCode and
01:58GetWeatherByPlaceName.
02:01If we want ZipCode, then down here I have to provide a ZipCode parameter.
02:06If I want to do PlaceName, I provide a PlaceName.
02:09I'm going to do ZipCode,
02:11so it says here is the parameter of ZipCode.
02:13I will give it my ZIP code right now.
02:16I'm just double-clicking to give it a parameter and I'm going to do 85253.
02:20There is a box here that says, "The value of this parameter could be set via a
02:24Web Part connection."
02:26We haven't talked about connecting web parts here, but what it really means is
02:29we could use other data inside SharePoint web parts to feed a value into this
02:36web service that could be useful. But I don't have other data right now, so I'm
02:40just going to leave this as is.
02:42Now, the same way that some web pages are freely readable and others require you
02:47to log on is the same with web services.
02:49And if you need to authenticate, you can provide different information on the
02:54Login tab of the Data Source Properties window.
02:57It's very common for web services to require credentials, but once again, this is
03:01really down to the requirements of your external data source.
03:04It doesn't really have anything to do with SharePoint.
03:06So I'm going to click OK, and I now have this SOAP service there.
03:11And I could tell, it was a SOAP service, because the address that I had included
03:16WSDL, which is a giveaway that it's a SOAP service connection.
03:20I'm going to jump to my site pages and create a new web part page and I'm going
03:25to use the classic full page here.
03:27I'll call this one soapExample.aspx, and I think you're probably good with
03:34where I'm going here.
03:35I'm going to jump in and edit this file.
03:38Once again, I'm seeing some data source details they're little out of date over
03:41here. Let me just turn that pane on and off.
03:44It doesn't want me to do that. Click back in. For some reason it's gotten a little
03:52confused on my Task panes, but no big deal.
03:55We'll reset the workspace layout and then open it up, but we have no data,
04:02so over to the Insert tab, and over to Data view, scroll down to find my
04:08WeatherForecast SOAP service, and click that.
04:11It thinks about it for a second, reads some information, and now we're getting back
04:16the results of that web service call.
04:18I don't even know where this machine is physically located, but we're
04:22reading data from it.
04:25I can save this and just test it just to prove that this is working in the
04:30SharePoint context. And yes, it is, so we're getting the WeatherForecast here with
04:35maximum and minimum temperatures.
04:37And this section here that says WeatherImage that's giving me a path to a JPEG file,
04:43well it's now really all that useful to see it like this, but no big deal.
04:48I can jump across and change that.
04:51Really what we want is the ability to format anything in this column
04:56differently from the others.
04:57I'm going to click inside the cell here.
05:00On occasion, it's a bit difficult to grab hold of, but as I mouse around, I get a
05:04little glyph on the right-hand side that allows me to expand it.
05:10And when I do, it says well the data field it's bringing back is
05:13the WeatherImage field.
05:14Do I want to format this as text, or rich text, or a hyperlink?
05:17No, I actually want it as a picture.
05:19It gives me a little warning, "Are you sure? Do you want to do this?"
05:23Yes, I'm sure, and that path is now being formatted as an image.
05:29I could go ahead and change the column headings
05:32if I wanted to, or even remove them entirely, apply some other formatting to these rows.
05:37I'm just going to leave it as is, hit Save, and F12 to test it,
05:42and there we go--external data are being drawn from a web service.
Collapse this transcript
Reading data from a REST-based web service
00:00Creating a data source that is based on a REST web service is very similar to
00:06creating one based on a SOAP service,
00:07but it's actually simpler than a SOAP service.
00:10If I mouse over this button in the Data Sources section, I'll see that I can use
00:15this to create a connection to a REST web service or RSS feed.
00:19In fact, I am going to use an RSS feed here.
00:21Selecting that, I don't even need to give it a WSDL file.
00:25It's more straightforward than that when you are doing REST web services.
00:29I am actually going to paste in the URL of a RSS feed I have, which is the feed
00:34for the lynda.com blog.
00:36This one will be easy to go through a few examples with.
00:38It doesn't need any parameters to be passed into it like the whether SOAP
00:43web service needed.
00:44And we don't need to provide any login information because it's freely available.
00:48So I'm just going to click OK.
00:51We now have a REST-based web service.
00:53We are going to do something a little different with the page that's using this.
00:57So I am going to go into my Site Pages library and create a Web Part page.
01:02I'll call this one RestExample.aspx.
01:08Single-click to go into it and then click to edit that file.
01:13And yes, if you're jumping ahead of me, you might also think we can go up to the
01:16Insert tab and insert the data view based on this web service,
01:20and we can; it's just not going to be all that useful.
01:24So I'll find this RSS feed and insert it.
01:28It's reading it correctly, but this does not look like the kind of information
01:33that I want to show as the information from a blog feed.
01:38It just seems to be the address of the feed itself and another link to somewhere else.
01:43And that's because the web part that we're using here has kind of made its best
01:47guess about the data it should be displaying, and it's gotten it wrong.
01:51You see, if I used the Data Source Details panel over on the right-hand side--
01:56and again, if it's not open, you can find it from the Task panes section of the
02:01View part of the ribbon--
02:04we can kind of browse through some of that information. And it looks like at the top level
02:09we've got things like the title of the blog, and we've got some links to where
02:14that blog is located,
02:16but the information we're interested in is a bit further down, nested inside of it.
02:20In fact, as I start to come down, I see that I've got a folder here called item.
02:26Really, it's just representing a collection of items, and I'm looking at 1 out of number 10.
02:31I can use the little arrows on the right- hand side to actually navigate through them.
02:36And as I'm doing that, it certainly looks like this is the blog information that I am after.
02:41We've got titles and links and publication dates.
02:45So what I am going to do is jump back to the page.
02:47I am going to select this web part by clicking anywhere in it and then
02:51grabbing the handle of it.
02:52I am just going to delete it because it didn't do what I wanted.
02:56What I want is really to have the title, and then I'm going to Ctrl+Click and
03:02select link and perhaps publication date, creator, and category.
03:07I don't want comments.
03:08Then I am going to grab these and drag them all over into that placeholder,
03:15let go, and we get a different version of that web part, formatted with more of
03:22the information that we're looking for.
03:24Now, this is closer to what I want.
03:25It's not quite there yet, but it's getting there.
03:29I can see, for example, that I am getting the title; that looks good.
03:31I got the link. Not so much.
03:34I don't really want to be displaying an HTTP address.
03:37I want somebody to be able to click the link and go there.
03:41Right now, this is just being displayed as text.
03:44So with my cursor somewhere inside the web part, I'm going to jump up to the
03:48Add/Remove columns and decide that no, I really don't need to display link.
03:52I might want to use it, but I don't need to display it.
03:56I am going to click OK and return.
03:58Okay, so we are getting closer here.
04:01What I'd like is for any of the titles to also be a link to the blog post that
04:06they're representing.
04:07And we can do this.
04:09Title is currently displaying as text, but if I mouse over--and it doesn't
04:12matter which one I've got selected,
04:14any of the titles will do--
04:16it recognizes that these are just repeating pieces of the same piece of information.
04:22So I mouse over the text till I get that little pop-up here.
04:25I'm going to tell it that yes, I want to show title, but I don't want to format it as text;
04:30I want it to be formatted as a hyperlink.
04:33And when I do this, it's first going to give me the warning that yes, this data
04:36is coming from somewhere else. Do you still want to do this? Yes I do.
04:40And it gives me this Edit Hyperlink window.
04:42It doesn't look all that friendly right now. Really the two things that you should
04:45be interested in is the very top part that says Text to display, and the very
04:50bottom, that says Address.
04:52Now, right now it's going to show title and try and link to title. I don't want that.
04:56I want it to show the title and the address is the link.
04:59Now, if you notice, beside both of these places, we've got this little function button.
05:05We've got one at the bottom. We've got one at the top.
05:07I'm pretty much going to ignore the whole middle section, because I don't want
05:11to link to something specific.
05:13I want to link to something that's dynamic, something that can change from day to day.
05:18So I'm going to come down here and say the address should be--I am going to
05:22grab this little function and it allows me to browse all the fields in my data source.
05:27What I'm interested in is link, and I want to be careful which one, because it's
05:31not the link of the feed,
05:32it's the link of the individual items.
05:35I am going to select that and click OK.
05:38Now, what it has actually done is it's inserted it in both places here.
05:43I have got text to display as link and title, and the address is link and title.
05:47That's not what I want,
05:48so I am just going to manually edit this right now.
05:51I'll just hit Delete up here. I don't want that.
05:55I want the text to display to be-- I am just going to write it--title and the
06:01address to be link. Click OK.
06:05Can't quite tell if it's working yet, so let's save this.
06:09Open it up in the browser.
06:10And while the formatting may not yet be what I'm looking for, it's getting
06:15closer. And if I click this link, we do successfully jump across to the
06:20lynda.com blog and to that particular entry.
06:24I could of course go through this little deeper, particularly by jumping to the
06:28table section. We could start to merge cells and combine things together and
06:32give things different styles.
06:34We are going to get to that a little later.
06:35And this gives you a taste of how we can start to use REST-based web service as
06:40a source of data in SharePoint Designer.
Collapse this transcript
3. Business Connectivity Services
Introduction to Business Connectivity Services
00:00Next up, I want to talk a bit about BCS, or Business Connectivity Services,
00:06in SharePoint 2010. So, what is this?
00:09Well, the quick six-word summary is it something that can make SharePoint talk
00:14to external systems. Okay, like what?
00:17Well, most commonly and easiest to understand, a separate database. But it could
00:21be a database, it could be a web service, and it could be another application.
00:25Now the question that might be running through your mind here is, haven't we
00:28just been doing this?
00:30Well, yes, kind of.
00:32This is another way to do it.
00:34If your remember that what we've been focusing on, very much the single-page
00:39model, defining a data source and inserting it onto a page, but using the much more
00:45powerful BCS allows us to really make that data part of our site,
00:50use it on multiple pages, use it in other lists and libraries, get it into
00:54Office applications, even include it in search results within SharePoint.
00:59These days whenever I have to do anything with SharePoint and external data, BCS
01:04is my primary choice.
01:06Now, I do go through the regular data sources first when I'm teaching this,
01:10because BCS does take a little more time to set up in SharePoint Designer than a
01:14regular data source, but it's worth it, as I'll demonstrate.
01:18Now if you're coming from SharePoint 2007, you might have heard, or even used, a
01:23feature called BDC, or Business Data Catalog.
01:27Now, it was also designed to do this, to be a connectivity story between
01:32SharePoint and external data, but for those have you encountered BDC, here is
01:36the core differences.
01:37Now BDC in 2007 was read-only and BCS is the CRUD, or create, read, update, and delete.
01:45We've got full read/write support in this version.
01:49BDC, you had to write a lot and a lot of XML to get this thing to work,
01:55whereas BCS in 2010, most of it can be done through the user interface of
02:00SharePoint Designer.
02:02And in SharePoint 2007, BDC was only available if you had paid for the very
02:07expensive server enterprise license, whereas we have BCS features even in
02:12SharePoint Foundation, the free version of SharePoint, this time around.
02:16But the biggest practical difference between the two is that BDC in SharePoint
02:212007 was just awful.
02:23It wasn't actually difficult, but it was mind numbingly tedious, unfriendly, and unpleasant.
02:28It was like doing your taxes while having a root canal at the same time, and BCS isn't.
02:34Doing the exact same thing, describing connections to external data, is actually
02:38quite pleasant in SharePoint 2010.
02:41And I think a lot of people from SharePoint 2007 kind of avoided BCS because
02:46they think it's the next version of BDC, and it's much more pleasant these days.
02:50It really is night and day.
02:51However, there is kind of an issue we are trying to learn it, because like much
02:56of SharePoint, trying to understand Business Connectivity Services, or BCS, as if
03:00it's one coherent feature, well, that's just going to give you a headache, because
03:04it's really a bunch of little pieces all wrapped up and given this name BCS.
03:10There are pieces for Office, pieces for SharePoint Foundation,
03:13SharePoint Enterprise.
03:15Now, one of the issues with first learning BCS is there is the bunch of jargon
03:20to it, and it's difficult to tell which of these things are important and which aren't.
03:24Well, let me make it a lot easier for you.
03:27There is basically one key concept that we need to understand to get started
03:33with BCS, and that's something called an external content type.
03:37This is the most important thing in BCS, the single most important piece.
03:44An external content type is a representation, a description of that external
03:51object, that product, or customer, or order, that thing that exists in your
03:55external system that you want to bring into SharePoint.
03:59Content types of course are things that we define inside SharePoint to
04:03describe the stuff we have inside SharePoint, like documents and images and lists and items.
04:10Well, an external content type is the same idea; we're just describing that piece
04:15which sits outside of our system. But everything we do in BCS is based on this
04:21idea of an external content type.
04:23This is step one, so let's see how to make one.
Collapse this transcript
Creating external content types
00:00So I have my site open in SharePoint Designer, and looking through the site objects,
00:05I can see that I have the regular content types.
00:07These are of course a very important concept in SharePoint, the definitions
00:11of the things that exist inside SharePoint, like pages and documents, forms and pictures.
00:17But we are dealing with external content types.
00:21We are trying to have a definition of something that resides outside of SharePoint.
00:27And by clicking this, it will take a little look and say, well, you have no
00:30external content types.
00:32That's to be expected.
00:33I am going to define one now.
00:34So I will click the button on the ribbon to create a new external content type,
00:39and we get this kind of informational page here.
00:42This seems like there is a lot to it, but really, most of this is not that important.
00:46We have the ability to single-click here to give this a name.
00:50What I'm going to do is define an external content type that's a separate database.
00:55This could be a connection to a database, it could be to web service, it could
00:59be to a .NET program, so it could be an actual line-of-business application.
01:06What I want to do is talk to a database called Pubs, and I am going to get some
01:09information about book titles, so I will call this Book Titles. And clicking down
01:15a little further, it's just going to copy that to the display name.
01:18I am ignoring the other stuff here.
01:21The only thing I am going to mention is this dropdown called Office Item Type.
01:25So this is the great thing with external content types.
01:29If you are trying to define a connection to some external data that actually
01:34maps to something you typically see in Outlook, say an appointment or a contact--
01:39maybe you got a contact management system that you're connecting to--
01:43you can choose to tell SharePoint, hey, this piece of data is like a regular
01:48Office contact, or like an office appointment or a task, and it will then support
01:53the ability to edit that using Outlook. You could go into Outlook and use the
01:58Contact part of the Outlook to edit that external data.
02:01Now for me, I'm interested in a list of books, so this, I am just going to select
02:05the default, which is Generic List.
02:08The most important part of this page is this link here. Beside the term External System,
02:14we have Click here to discover external data sources and define operations.
02:20This is the part that we have to do.
02:21It kicks us to the another page, which again looks complex, but there's really
02:26not much going on her. The only option that I have is to add a connection
02:30because nothing exists otherwise.
02:33So, I will click that button.
02:35It's going to ask, what kind of data am I supposed to talk to?
02:39We have the first one, which is .NET Type, and the last one, which is WCF Service.
02:44These would be meaningful to .NET developers because you can talk to WCF web
02:48service or an assembly written in .NET.
02:51But the classic example here is the SQL Server item.
02:55So I am going to select that and click OK.
02:58It says great, you want to connect to SQL Server, well, what SQL Server?
03:03We need to give it the name of the database sever, which for me is DB server, and
03:07the name of the database on that server, which for me is going to be pubs, the
03:12other classic, old-school Microsoft sample database.
03:16Now below this, we have the important stuff, the authentication options, and what it
03:21has here is Connect with User's Identity. And this is a great one if you can get
03:27it to work. The issue is if your SharePoint server and the database you are trying
03:32to connect to exist on separate machines.
03:35You may run into problems there because it can't just pass your identity around.
03:40That's something you need to talk to your systems administrators about
03:43because if you have a full system that's set up with the authentication
03:46scheme of Kerberos, you may be able to get it to work, but if you don't, then it's unlikely.
03:52I'm going to use another option. In fact, I am going to talk about this one a
03:56little later on, but I am going to use this third option to Connect with
04:01Impersonated Custom Identity. What does that mean?
04:05Well, imagine that this system that I am trying to talk to actually requires
04:09different credentials than the ones that I'm currently logged on with, which is
04:14pretty common thing to have.
04:15Well, SharePoint now supports the idea of being able to connect my currently
04:21logged on identity with a custom identity and even store that information for us.
04:26I am going to talk much more about that in a moment,
04:28but let it be said that right now we're going to be using something called the
04:31Secure Store service.
04:33Now, I've already defined this in the background.
04:35It has to be done in SharePoint central administration,
04:38so it's a systems-administrator- level task to just set this up.
04:42But I have something define called pubsDB, which is actually going to take care
04:46of storing all my credentials. I click OK.
04:50What it's going to do is talk to that store and say well, I was looking for you,
04:54but I didn't see any information about you,
04:56so how do you connect? And what I'm doing here is I'm giving it the different
05:01credentials that I use when I'm connecting to the database, which for me is
05:05pubs_simon and my password there. And this could be the same whether it was a SQL
05:11server, whether it was a separate application; it's the idea of different
05:15credentials for different systems. I click OK.
05:20It thinks about it for a second, uses that data to connect, and then we have
05:25that pubs appear in our Data Source Explorer.
05:28I can expand that. I can see tables, I can see views if I have any, and even
05:34routines, like store procedures.
05:36This is a simple database, so I'm interested in titles.
05:40Now, I could expand this.
05:42The thing that I am doing here is we are not done.
05:45What we have to do is start describing what about this data source are we are interested in.
05:50Are we interested in authors or employee? Are we interested in everything, or is
05:55it just filtered information?
05:57Well, I'm interested in titles.
06:00And if I notice, even with this selected, it's actually still telling me over
06:04here, you cannot save this external content type without defining at least one operation.
06:09It's saying yes, you have described that there is some data you are interested in,
06:12but I don't know about that data you're interested in.
06:15So it says the external content type must have a Read Item and a Read List Operation.
06:21Okay, well, we can give it far more than that.
06:23If I come over to my Titles table and I right-click it, I get the ability to
06:28create a new Read Item operation, and you Read List operation. It says I need
06:33those two, but I have also got the ability to have a Create operation update and
06:37Delete. Or at the top, the easy way out, Create all operations. I am just going to click that.
06:43What it does is read the information and then actually pop up a wizard that's
06:49going to step me through what it's done, what it's guessed for me.
06:54So there's been no errors and warnings.
06:55If there was errors, that would pop up down at the bottom.
06:57If I click Next, it says, okay I was going to bring back this information and I
07:02could step through it. And it's telling me a little bit about how it's mapping the information.
07:07Did it make a good guess?
07:10It's the right kind of information. Dates are dates and numbers are numbers, and so on.
07:14I am leaving all of this as is.
07:17This is something that you might need to change if it's not working properly.
07:21Often it's something that might require you to have a little bit of communication
07:25with your database administrator, or at least some developer that's familiar with the system.
07:30If I click Next, it's asking me to add my own filter Parameters.
07:35I have a warning down here that says, "It's strongly recommended to add a filter
07:39of Type Limit," for this,
07:41because without it, it may result in large result sets.
07:44What that really is saying is, you don't have any filters on.
07:47You might be retrieving 30,000, 40,000, 50,000 records at a time, or at
07:52least trying to do that.
07:54Well, I know that this database isn't all that big, so I'm not going to put a filter on it.
07:58I am just going to click Finish.
08:00And I can see over here, it's not complaining any more.
08:04It's actually saying, yes, you do have Create, Read, Update, Delete and Read List
08:08operations defined for this external content type.
08:12If I look up on the tab, I can still see that little asterisk after the term.
08:16Book Titles. That's our clue that this has not been saved yet, so I'm going to
08:20save it. And it says, "The changes to the content type are being saved to the
08:26business data connectivity metadata store,"
08:28a very complex phrase that basically means it's being saved up into SharePoint.
08:35So we now have our first external content type.
08:37If I click here, I can see that it's listed here.
08:40Now we haven't done anything with this content type, but that's coming up next.
Collapse this transcript
Creating external lists
00:00So we have an external content type defined, but so what?
00:04Well, in all our dealings so far with external data, we have then created a web
00:09page and used that data source to fuel a web part on that page.
00:13That's not what I'm going to do here;
00:14it's a different kind of tactic.
00:16This is much more of a true integration piece.
00:19We have defined this connection to, in this case, the titles table on a book's database.
00:26What we can do now is create a SharePoint list based on this external content
00:32type, and I'll automatically have the page to view that list, the page to add an
00:36item, the page to delete an item, a page to edit an item, generated for us.
00:41I can do that from SharePoint Designer.
00:43If I'm in the External Content Type section, there is an option up here called
00:46Create Lists and Form.
00:48I don't have to do it here.
00:49I can in fact open up the web site that that external content type is defined
00:55on, and I can create it from within the SharePoint site itself.
00:58If I do that, it's like creating any other kind of list.
01:01I go to my site Actions and come down to More Options.
01:08I could also get this through the View All Site Content link. And we have all the
01:13typical built-in SharePoint blank sites and calendars and contacts and different
01:18web databases. We are interested in filtering down to list here, and this is the
01:24one I'm interested in, the External List type. And if you see the preview here,
01:29it says, "Creates an external list to view the data and an External Content Type."
01:34This is very important. We are not importing the data.
01:38Anytime we see it, we're seeing fresh data being drawn from that external source of data.
01:44So I'm creating this external list. I'll hit Create.
01:48It's going to ask me to give it a name. It doesn't matter what I call it, but I'll
01:53call it Titles on Pubs.
01:56Give it a description if I want to.
01:58I'll say yes, display it on the Quick Launch bar, and then it's going to ask for
02:02what is the external content type.
02:05We have two icons here. One will check if whatever I write exists, but the one
02:09I'm interested in here is the second one to select the external content type.
02:14It's going to show me the list, and this is the only one it knows about.
02:17It says the external data source is pubs
02:19and the content type is Book Titles. That looks correct.
02:22We could have 50 of them. You never know.
02:24I then click Create.
02:28We jump in, and it looks like a SharePoint list, but notice one I'm getting here.
02:33I have this link here that says Click here to authenticate, and that's because
02:38I'm using the Secure Store Service.
02:42What's actually happening here is that it is detecting that this is the first
02:45time I'm viewing this list through the SharePoint site and it's demanding that I
02:51sign in, that I provide my own credentials for this external data.
02:55It will then save them.
02:57So I'm going to click here.
02:58Now, because I have my server set up and it doesn't have https turned on,
03:03it's giving me a warning here that this is not encrypted, so information
03:06will be sent in clear text. That's fine.
03:08That's okay. I am all internal here.
03:11So I'm going to provide my connection information for when I'm viewing this
03:15within a SharePoint site, which is pubs_simon. It's a completely
03:20different account than the one that I'm logged in to right now. Click OK.
03:28It thinks about it, connects, brings back all the information.
03:34We can even mouse over.
03:36We have the ability to Edit these items. That will generate the page to edit it.
03:42We have the title You Can Combat Computer Stress to You Can't Combat Computer Stress.
03:47There we go. Hit Save.
03:48And we are writing back to the database because my permissions allow me to do that.
03:54I can come out to the top of the columns.
03:55I can click the column headers to order them up or down and all the
04:00usual SharePoint stuff.
04:01It really is behaving like a SharePoint list.
04:06I can work with all the normal settings.
04:08I can modify the view.
04:09I can extract columns. I can filter.
04:11I can group. But this data is fresh and being drawn from the database as
04:15we were looking at it.
04:16Now you might think that the whole problem of having to sign in is going to get
04:22a little old if we have to do that all the time, but we don't.
04:25I'm just closing those down.
04:26I'm going to reopen it just to prove that point.
04:28If I go back to the site, whether this was an hour later or the next day,
04:32the next time I go and look at that, it's not asking me to authenticate
04:36because it's already save my credentials in the secure database and the
04:40Secure Store Service.
04:41If I signed on as somebody else, it would be asking me the first time that I
04:46logged on to be providing that information.
04:50This is how we create an external list in SharePoint based on an
04:55external content type.
Collapse this transcript
Introduction to the Secure Store Service
00:01So a feature that I used in my example of an external content type, and it's often
00:05used together with BCS, is something called a Secure Store Service.
00:09This replaces something known as single sign-on that existed in SharePoint 2007.
00:14What this Secure Store Service allows us to do is handle credentials very securely.
00:18We don't have to store a username and password in the page for anyone to see.
00:24Now this must be set up by your system administrator, because it's going to
00:28create an encrypted database that lets SharePoint securely store multiple sets
00:33of credentials for external systems.
00:36After it's set up the system administrator defines what are called applications.
00:40Now, applications sound complex, but they are actually really, really simple.
00:44They're basically just a name and a list of what needs to be stored, usually
00:49just a username and password.
00:52So, an application is defined for each separate database or line-of-business
00:57system or web service or whatever it is you need to connect to.
01:01No connectivity information is provided, simply given a name. Like say I'm
01:06creating an application called salesforce that should store a username and a
01:10password, or I'm creating an application called pubsDB that needs to store a
01:15username and password.
01:17They can be stored per individual, or they can be stored on the group level as well.
01:22Individual is more common.
01:25The situation is that you now have the Secure Store Service and its database as
01:30part of this whole picture, between you and your PC, the SharePoint server, the
01:35external system, and this new Secure Store Service.
01:38So let's say Bob opens up the browser on his PC and makes a request for a SharePoint page.
01:46The page is using an external content type, and if it's been defined with the
01:50Secure Store Service, SharePoint will automatically make a request to that
01:55database and say hey, do I have credentials for Bob?
01:59If no credentials are found, what then happens is this login page is
02:04automatically generated and sent back to the browser, sent back to Bob. Bob then
02:09provides his credentials.
02:11Those go back through, pass through SharePoint, and are stored in the Secure Store
02:16Service, then retrieved for that SharePoint page, and we use those permissions to
02:20connect to the external system.
02:23Next time around, whether it's a day or an hour later or a week later, Bob opens
02:27his browser, makes a request to SharePoint, SharePoint looks to the Secure Store
02:32Service, says yes, we still do have those credentials for Bob, securely
02:37retrieves them, and uses those to connect to the external system.
02:41And all you really need to do to have this work is just turn this on.
02:46You don't have to create a login page;
02:48it will be generated automatically.
02:50If you saw in my example of using the external list, the first time I tried to
02:55view it, it asked me to provide that authentication, the username and password.
02:59For requests after that, it was fine.
03:02It just let me through.
03:02Now if your system administrator hasn't ever set up the Secure Store Service,
03:08that we'll need to get done.
03:09It doesn't take very long.
03:10Most of the heavy lifting is done internally in SharePoint. And after that,
03:15each new application that represents each external system can be added in
03:19minutes, and in SharePoint Designer, all you need to do when you're creating
03:24external content types is know the name of the application in the Secure Store
03:28Service, and SharePoint will do everything else.
Collapse this transcript
4. Data-Driven Pages
Understanding data-driven web pages
00:00So let's recap. We define a source of external data by creating a data source or an
00:06external content type.
00:07Now this isn't a coin-toss decision.
00:09A lot of the time you'll have no choice;
00:11you're going to be constrained by what it is you have.
00:14So with a data source, we can use that to connect to SQL Server, or Oracle, or an
00:19OLE-DB-compliant database, a REST or SOAP web service, an XML file, and the
00:25built-in SharePoint lists and libraries are of course data sources.
00:28When we're working with external content types, we have the choice of SQL Server,
00:33a .NET type, or a WCF web service.
00:36Now, I am not covering the last two in this course because they tend to be more
00:40complex and really unique to your environment, but everything we do here
00:44applies to those as well.
00:45So if you have SQL Server, you could choose either, and if you do have a choice,
00:50I recommend the external content type.
00:53It is more up to date.
00:54It's more powerful. So, then what?
00:57Well, we want to be able to interact with that data that we've defined, so with
01:01data sources, your next step is to typically create web pages that use those data
01:06sources. I've been creating them in the Site Pages library. And with external
01:11content types, the classic next move is to create an external list based on that
01:16external content type.
01:17And because an external list is a list, it is automatically considered a data
01:23source in SharePoint, like all the other lists in SharePoint.
01:26But one thing that's different here is that creating an external list
01:31automatically generates some web pages. You'll get at least one to view or read
01:37the list, and you'll get one to view or read a single item. But if you specify
01:43the external content type as allowing inserts and updates, you'll also get a web
01:47page to add or insert an item and one to edit an item.
01:52Now, SharePoint refers to these pages as views and forms.
01:57And essentially, they're just pages with web parts on that show either a view or a form,
02:02but what's the difference between the two?
02:04A view is something that looks at the list as a whole, and a form is oriented to a single item.
02:10Now technically, there could be a bit of a crossover here.
02:14A view could show one item, either because we only have one item in the list or
02:19we're filtering the view to only show one.
02:22But a view is oriented to the list as a whole;
02:24a form is oriented to a single item.
02:27So how so I know this is what's going on with my external list?
02:31Well, let's take a look.
02:33I have my site open in SharePoint Designer, and what I'm going to do is go to my
02:38List and Libraries area, which is where I am going to find my external list.
02:42You will find those in your List and Library section.
02:45This I've already created based on an external content type.
02:48And if I single-click this to see the informational page about it, what I can
02:53see over here is I have one view defined called Book Titles Read List and three
02:58Forms: DispForm, EditForm, and NewForm.
03:01That's displaying a single item, editing a single item, and creating a single item.
03:07These are all pages and they are all considered independently editable and customizable.
03:12I could just click say the View page and open that one up.
03:16It takes a second to read all the information about it.
03:20But yes, I'm looking at a page in SharePoint that I can even see by selecting in
03:24there as using the XSLTListViewWebPart.
03:28If I close that one down--I don't need to save any changes here.
03:31I am going back into that External List.
03:34I'm now going to open up say the NewForm.aspx.
03:38And this is a form web part.
03:42If I select in here, it's saying it's an XSLTListFormWebPart as opposed
03:47to ListViewWebPart.
03:49So this is what happens when you have an external list,
03:54but this is what happens with all lists and libraries in SharePoint, not just
03:58external lists, but all the standard SharePoint ones.
04:00If I click back to my Lists and Libraries and look at a standard SharePoint list,
04:04like Announcements, that's also what I get here.
04:07I get one page to represent the All Items view, and three forms to represent
04:12individual items there.
04:14As you'll know, if you browsed through SharePoint for any length of time is
04:17are some lists that you work with have just one single view, whereas others
04:22have multiple views, particularly the task list is a good example of a built-in SharePoint list,
04:28that if I click this dropdown arrow in the Browse part of the ribbon, I'll see
04:33multiple views: All Task, My Task, Due Today, Active Task, By Assigned To, By My
04:38Groups. Well, these are also consider customizable pages in SharePoint Designer.
04:43If I jump back in here, jump into my List and Libraries and into the tasks list,
04:49I will see pages that represent every single one of those views.
04:52A lot of these can be edited in the web browser, but you can do even more
04:57significant editing using SharePoint Designer.
05:00But as you can see, when you're working with these external lists, what
05:03SharePoint is trying to do is present them to you exactly the same as a
05:08regular list in SharePoint, as similar as possible, and create you these
05:12different web pages.
05:13Now if you are working with data sources, well, then the pages don't get created
05:20automatically for your REST or SOAP services or your database connections here.
05:25And we've made several View pages so far in our Site Pages section, but I can
05:30also make a Form page that works with an individual item.
05:33If I create a new web part page, again just picking the Full Page Vertical
05:37here, I am going to create one based on the database connection I already have,
05:40so I'll call it dbAddItem.aspx. Edit that one.
05:49And whereas so far we have been clicking in this placeholder and coming up to
05:54the Insert tab and choosing a Data view,
05:56what I could just do in here is choose a New Item Form.
06:00I'll base that on my database connection of products on Northwind.
06:04It thinks about it for a second and gives me a form to insert a single item.
06:10This is of course customizable.
06:12We'll get into that in a moment, but this is the general procedure for doing this.
06:15And as we'll see, what we can also do when we're creating our own pages, or
06:19customizing pages, is have ones that show multiple sources of data at the same
06:24time, or views and forms together, to show say master and detail sections.
Collapse this transcript
Working with Data View and Data Form Web Parts
00:01Here's the thing that can puzzle people at first:
00:03you'll find that there are multiple web parts available in SharePoint to
00:06represent views and forms.
00:08There is the ListViewWebPart, the XSLTListViewWebPart,
00:12the DataViewWebPart, and sometimes there appears to be very little rhyme or reason to
00:17which one is used where.
00:20If I create a new page in SharePoint Designer, I'll just do the standard Web Part page.
00:24I'll just call this one webparts.aspx.
00:27I'm just using this as a demo here, and go into Edit mode on this one.
00:32I'm going to click into the placeholder for content here, and I'll insert a data
00:38view from the ribbon that's meant to represent say one of the built-in SharePoint
00:43list, like the task list. And I can see that by selecting that option, I got the
00:48XSLTListViewWebPart.
00:50Well, let's say that was an accident.
00:52I didn't mean to do that.
00:53So I'll close that and say No, I don't want to save changes.
00:56Let me go back in and edit that one again, and this time around I'll click
01:01Insert, but I will insert say the SOAP service here.
01:05Well, this time I use the same button to insert it from the ribbon, but I have a
01:10data form web part being shown here, which seems little odd.
01:14I don't have the XSLTListViewWebPart anymore. And while we usually associate
01:18the term 'form' with a single item, this does seem to be showing me what I
01:22consider a view, which is multiple items at the same time.
01:25See, the thing is, SharePoint Designer is picking the web part to use based on
01:30where you're data is coming from.
01:32If your data source is a built-in SharePoint list or library or an external list
01:37from an external content type, when you add a view, you'll get the
01:41XSLTListViewWebPart.
01:43This is the most recent web part, new in SharePoint 2010.
01:47If it's from a data source, something like a web service data source or an XML
01:51file data source or a database data source and you add a view, you'll get the
01:56older data form web part. And notice this is a form web part showing a view, not
02:01a view web part, which is kind of annoying.
02:03There actually is a data view web part, but it's not used in this version of
02:08SharePoint, unless you've upgraded pages from an older version, like SharePoint
02:122007, and there are other situations.
02:15We have talked about views, but what about forms?
02:17Well, if you add a form for an external list, you'll get the
02:21XSLTListFormWebPart. But if you add a form for a built-in SharePoint list,
02:26you'll get the ListFormWebPart, no XSLT.
02:30Now, this could get confusing, in fact, really confusing, if we had to remember
02:35which one to use where, but here's the good thing:
02:38it's not really up to us.
02:40The web part that's used will be decided by SharePoint based on our data
02:45source; we just have to deal with the results.
02:48So whether we seem to be editing XSLTListView or data form web parts, you'll
02:52see many of the same options in SharePoint Designer are exactly the same on the ribbon.
02:57Now, you will find that some of these web parts, when viewed in the browser, do
03:02have a browser support, full ribbon support.
03:04A classic example would be say let's look at the task list.
03:09This is actually using the XSLTListViewWebPart, and I can see that I have list tools.
03:14I have full ribbon support here to create a view and modify the view; all that
03:19stuff that's actually built in.
03:21If I look at something that's a bit more old school, for example jumping into
03:25my Site Pages library and looking at my XML example, I will not see that level
03:31of support on the ribbon.
03:32There is not a lot I can do or customize about this view from the page itself.
03:38About the only thing I can do, if I don't like this untitled_1, is I can jump to
03:42the page ribbon, and I can edit the title bar properties, which will give me the
03:47web part editing page over here on the right, and I'll just say XML Books File.
03:56That's about the most I can do there, switch back to browse mode and see that new title.
04:02But all of these can be edited in SharePoint Designer.
04:06If I open up that XML page in SharePoint Designer, I'll see a lot more options,
04:11when it refreshes the page, about editing that up here on the ribbon.
04:15Now as you start to create a few more of these pages, you will naturally start
04:22to recognize when and where each ones are being used.
04:26But if you make the assumption that you're doing all your changes in SharePoint
04:29Designer, you won't really have to worry about the level of browser support.
Collapse this transcript
Filtering, sorting, and grouping data
00:00We can easily change options on our web parts to present a better view of our data.
00:06Now, we can do that on any of the pages we create in the Site Pages library, or
00:10we can do it on our external lists.
00:13I'm going to jump into my external list here and customize the main view page.
00:20This is the one that I have defined with an external content type going to
00:23the pubs database, but customizing these web parts would be the same wherever you had it.
00:28So I'm going to make sure to be clicked somewhere in the web part.
00:32I like grabbing the handle of the web part itself, and the important stuff is
00:36up here on the ribbon.
00:38I'm in the first part, which is the option section.
00:40I'm first going to click on Filter.
00:42Let's say I think that we're bringing back a few too many books here and what
00:46I'd like to do is bring back the computer-related ones.
00:49Well, I can see that there might be some in there related to computers, so I'm
00:54going to say that I'm interested in filtering where the title--I don't want to say equals.
01:00I want to say, what do I have? We've got contains.
01:03Let's say it contains the word computer.
01:07Now this is case-insensitive, so it would be computer or computers.
01:13I can see down here on my page
01:15I have got Computers with an uppercase C and a plural, but this would work just fine.
01:19Now, I could filter just on that.
01:21If I click OK, it will even update the data view while I'm in this design
01:25mode, and I could see we have got Cooking with Computers, You Can't Combat
01:29Computer Stress, Straight Talk About Computers, et cetera.
01:31I'm actually going to edit that and add in a couple more.
01:35So I'm going back to the ribbon, click Filter, and where it says Click here to
01:39add a new clause, I'm going to do that.
01:42What I'm going to do is say it could also contain the word database.
01:48Now if I do that, what I want to make very sure is that up here on the first
01:54clause, the first condition, I change this to an Or.
01:58So it's saying where the title contains a word computer or the title
02:01contains word database,
02:02let's see what's happening now.
02:05Busy Executives Database Guide, Cooking with Computers. We're looking good.
02:08In fact, I'm going to do one more quick one to also include the idea that the
02:13notes field might contain those words too.
02:18So, as you can see, we can actually very quickly build out fairly large sets
02:23of clauses here, and I've accidentally clicked on the last one and added an extra clause.
02:30I don't need that, so I'll just highlight that and hit the delete key. There we go.
02:36We can ignore the very last And or Or because it doesn't mean anything; it's only
02:41these first three that I'm interested in.
02:43So I click OK and it updates the data view to take those filter conditions into account.
02:50While I'm doing this, of course, I can save and test at anytime. The little clue
02:55that I haven't saved is the asterisk after the file name up here on the tab.
02:59So I can either hit Ctrl+S or I can hit the floppy disk icon at the top-left,
03:04and once that's done, I can hit F12 to open it up in the browser. And we're
03:10seeing all the books right now that contain the word 'computer' in either the
03:13title or the notes or the Word database.
03:18It still looks a little messy,
03:19so I'm going to tidy this up even further.
03:21Back into SharePoint Designer.
03:23I'm going to jump up into the Sort and Group button here.
03:28Now by default this is actually sorting by title ID ascending, which is what
03:33the yellow triangle means here.
03:35You can click the radio button here to change that, or you can just double-click
03:38the sort order and that would flip it up and down from ascending to descending.
03:42Let's say I don't find that all that useful. What I might be interested in is to
03:47sort by price ascending.
03:49So I'm going to actually click title ID and remove that, and this does exactly
03:54what you think it does. We are filtering.
03:58We're also sorting by price.
04:00We have a couple of books here that don't have a price, so they are being
04:04considered very early on in that sort sequence.
04:08But I can also see by scanning this information that I seem to have a type
04:12column here, which is like a category. Some books are business. Some are like psychology.
04:16Here is another business one.
04:18And what I want to do is group those ones together.
04:21So I'm going to go back and click on these Sort and Group and to group,
04:25you first need to sort.
04:27So I'm going to find type over here on the left, which is one of the available
04:31fields, add it to the sort order. But with it selected, I'm going to click this
04:36button here to say Show group header.
04:39I can choose to either have this expanded or collapsed by default. I'm just
04:42going to leave it expanded.
04:44We click that, we click OK, and now SharePoint will take care of grouping these
04:48into their individual types.
04:50We're also sorting by price ascending. Now, there is not an awful lot going on here.
04:56So what I'm going to do here, just to give us a bit more to look at, I'm going
04:59to go back to my filter section and just remove the filters, highlighting this
05:03left column here to select each row, click and delete, click and delete, click
05:07and delete. Click OK. Just to give us a little more to deal with,
05:12I'm going to save this page and hit F12 to open that up in the browser.
05:16Of course, this data is being drawn instantly from that completely separate
05:22database on a separate server, but SharePoint is generating the interface for me.
05:27I can actually click the little Minus button to collapse and expand these groups.
05:31We're sorting by the groups. Then we were sorting by price ascending within the groups.
05:36Sure, there's some more I could change about this page if I'm grouping them
05:39together into the categories, like psychology here, I really don't need to also
05:44be showing the psychology column. But it's always a good idea to have your data
05:48filtered and sorted and grouped correctly first, so that we have the structure
05:53of the data correct before we start to work with the presentation of it.
Collapse this transcript
Connecting web parts
00:00So, up to this point, we've been creating pages with single web parts on them, but
00:05we can add multiple web parts to those pages.
00:08Let me show you why we might, just with a simple example.
00:11I'm going to make a new Web Part page in my Site Pages library.
00:14I'll just call this one multiple.aspx, jump in to edit this, and click into the placeholder.
00:26Now as ever, I'm going to jump up to my Insert section of the ribbon and come
00:33across to Data View.
00:35Now, it really doesn't matter with what I'm trying to describe here, whether the
00:38data is coming from a built-in SharePoint list or library, from a database,
00:43data source, from an external list, from external content type, or from anywhere else.
00:48It's going to work pretty much the same way.
00:50I'm going to select my database connection that I have here. It thinks about it for
00:55a second and then inserts this classic Data View here, choosing the data form
01:00web part, but it's a view of multiple pieces of information.
01:03Well, let's say that wasn't what I wanted.
01:06Let's say I was really interested in just showing the titles right now.
01:10I'm going to select that web part and delete it.
01:14But because I'd added it, I do have my Data Source Details pane hanging over
01:18here on the right-hand side.
01:20If you couldn't see that, you can get it from the View section in the menu
01:23in your task panes.
01:24But what I'm going to do is select just ProductName, making sure that my
01:30cursor is selected in my placeholder, and then say Insert Selected Field as
01:35Multiple Item View.
01:37And we just get now the ProductName, just that title.
01:43It's still a web part.
01:44It's using the data form web part here in fact. Because this is almost certainly
01:48considered untitled, I'm going to jump up to the Web Part section and give this
01:53web part a name, which is Product List.
01:57But what I'd like to do is have a different area on the same page that shows all
02:02the information about the product.
02:04The way I'm going to do this is by looking at the web part when it's selected,
02:08I'm going to click underneath it just to select somewhere in there that's
02:12outside of the web part itself.
02:14Again, I want to make doubly sure that I've done that. So yes, with the whole
02:17web part selected, I can see the blue area denotes where it begins and where it ends.
02:22I want to have my cursor clicking outside of it.
02:25I'm going to come over to the same Data Source Details and select, in fact
02:29I'm going to Ctrl+Select on every field here.
02:35And from the button this time around, I'm going to choose to insert this as a
02:39Single Item View, not Multiple Item View.
02:43What this does is insert another web part on the same page, but this one has got
02:47a different perspective
02:48of the information. It's showing me all details about one product instead of just
02:53the product name of all of them.
02:55Once again, this web part probably doesn't have a name, so with it selected, I'm
02:59going to jump up to the web part section of the ribbon and say that this is
03:04Product Information.
03:05I'm going to hit Save, and then I'm going to hit F12 to test this in the browser.
03:14Okay, it could do with a bit of updating.
03:16I've got a few too many blank lines between the two here.
03:19But I see I have got the full product list, and then I've got individual product
03:22information, but there's no connection between the two right now.
03:26That's what I need to create next, and that's what this is all about here.
03:31I'm going to delete, click in the blank area between them, and just delete a couple
03:34of lines there to not have so many spaces.
03:37And what I'm going to do is select the first web part.
03:42It doesn't actually matter which one I select because I want to connect the two,
03:46and I can drive them either way.
03:48I can go from the top to the bottom or from the bottom to the top.
03:52With that top one selected, I'm going to come up to this button of the ribbon
03:55that says Add Connection.
03:58It takes a look at the web part and says okay, I'm presuming that what you want
04:02to do is send some data to another web part,
04:06and that is what I want to do.
04:07My other options are to get some data from somewhere else, but that's not relevant here.
04:12Yes, I'd like to send a row of data. Well, who to?
04:15I click Next, and it says, well, your source web part is Product List.
04:19That's good. Where's the web part you want to connect to?
04:22Is it on this page, or is it on a different page?
04:25Well, it's on this page, so I'll click Next.
04:28It's saying that the only other web part I can find is untitled, and that's
04:31I think because I didn't save my new title change to that web part, but that's fine;
04:36it'll work correctly anyway.
04:38And it's saying, what do we want to do with the second web part?
04:40Do we want to filter based on some values we've been sent? And that's
04:44exactly what I want to do.
04:45So bear in mind I'm not changing anything.
04:47I'm really just clicking Next through all of this.
04:50I click Next again.
04:51But this is the screen that I do need to change because it's asking me, how do
04:55these two web parts connect?
04:57It's recognizing that there's all these different fields in the second web part,
05:01and it's not understanding exactly how to hook them up.
05:03Well, really the important thing is this. ProductID in the second web part is the
05:09key for that product table,
05:11so I should hook this up with ProductID in the first web part.
05:16So making sure those match, and if you need it to match on multiple columns, you
05:20could do that, too, but I'm okay with one.
05:23I click Next, and now it asks, well, how do you select a product?
05:27So in the first web part, do you want me to create a hyperlink on the
05:31ProductName, which is currently just un-clickable text?
05:34And yes, this sounds good,
05:35so I'm going to do that.
05:36I'm just going to leave the rest of it blank, click Next, and click Finish.
05:40Now selecting that second web part, I'm going to make sure this one actually
05:45has a title here. That was meant to be Product Information, but it seemed to
05:48have lost it last time. All right!
05:56I'm now going to save this.
05:59I'm going to hit F12 to open it up in the browser.
06:01What I can see just by looking at is we have the Product List at the top and
06:06Product Information below.
06:07I'm going to pick say a random one here, Northwoods Cranberry Sauce, and I see
06:12that it immediately updates the Product Information web part with all the
06:16details about that product. We can jump ahead.
06:18We can do multiple ones here.
06:20I can page several levels down in the product, go to Sasquatch Ale, and indeed
06:26get the Sasquatch Ale information.
06:29Sure, it's not the most interesting page in the world, and it could do with a bit
06:34of cleaning up, and in fact, it would probably be a good idea to shrink down this
06:38web part and put the other one up there beside it, but this will work just fine.
06:42The point that we're trying to get here is how to connect two web parts together.
06:46Now, when the web parts are created on a page, you can often hook them up in the
06:50browser too, but I typically find it's more useful to define them internally
06:56on the unique page itself, and you'll find that from the Add Connection button here.
07:01What I also see here is that we have the Manage Connections button is active
07:05because SharePoint Designer is recognizing there are active web part connections
07:09defined on this page.
07:12And while these two web parts are really showing the same data, just different
07:16views of them, we can use the same concept to connect between different data on
07:21web services and databases, link between master and detail tables, and show a
07:27lot of different information with the same principles.
Collapse this transcript
Creating master/detail pages
00:00Creating web pages with web parts that connect to multiple data sources is also easy.
00:07I'm going to create a new Web Part page in my Site Pages library.
00:10This time around, I'm going to select one which actually has multiple levels to it,
00:14so I'll select this third one here, and I'll call this masterDetail.
00:20I'm going to make this connect to different data sources.
00:25Now what I have gone ahead and done is in my Data Sources section
00:29I've created a couple of new database connections to other tables on Northwind.
00:33These were created exactly the same as my connection to products was.
00:38So I'm not even messing with external content types here.
00:41So back into Site Pages,
00:43I'll edit that masterDetail, and we've actually got three sections to it here.
00:53Now, occasionally, these can be a bit difficult to grab when you're in SharePoint,
00:57particularly the small ones,
00:58so I'm just actually just going to insert a few letters in each one to make sure
01:03that I keep track of where they are.
01:07In the first section, what I'm going to go ahead and do is jump up to my Insert
01:12tab and insert a data view for Orders on Northwind.
01:22That's a little bit too much information here.
01:24I don't really need a RequiredDate, nor do I need EmployeeID,
01:28so with that highlighted, I'll jump in and remove those columns.
01:33EmployeeID is gone, and RequiredDate is gone and click OK.
01:39Then I'll come down and in the second section here, I'll just hit the Enter key
01:44to give myself some space, and I'll insert another data view.
01:49This time around, it will be Order Details.
01:51Now there is no connection between the two right now as far as SharePoint is concerned.
01:54We will make that ourselves in just a minute. And then over here, I'm going to do
02:00the third one, which is inserting a data view for Products on Northwind, the one
02:05we have already used quite a few times.
02:08And this one, I don't need quite so many pieces of information either,
02:12so with that web part highlighted, I'll jump into Add/Remove Columns and get rid
02:16of Quantity and Category and SupplierID and click OK.
02:21At this point, I could even get rid of the extra letters that I'd added to
02:25keep placeholders there.
02:28So I have three web parts showing up.
02:30Now what I need to do is go ahead and connect them.
02:33Before I do, I'm just going to hit Save, just in case we run into any problems here.
02:38So what I want to do is connect from the orders information to the order details
02:43information, and then from order details, which has a ProductID, I want to
02:46connect to products.
02:47So we will start from the top.
02:51Selecting orders, I'll click Add Connection.
02:53It's going to ask, do you want to send a row of data? Yes, I do.
02:57I want to send that order ID down to order details and get all the details for this order.
03:02So, we jump ahead.
03:03We click Next. Yes, I am connecting to a web part on this page. Next again.
03:07That's even taken a guess. Is it order details?
03:10Yes, it is, and yes, I want to get filter values from, I click Next once more.
03:14This is where I have to describe the connection between the two, and what we
03:18want is that OrderID on the top web part is connecting to OrderID on the lower web part.
03:24So let's find OrderID here and make sure that it maps to OrderID on the top one.
03:31You would have all sorts of weird and interesting results if you mapped up the different
03:36columns--definitely not what you want.
03:39Here it's asking how do we select the item in the top web part? And yes, creating
03:43a hyperlink on OrderID will be just fine.
03:46I'm going to also check this, which allows us to highlight the column to indicate
03:51which row is selected.
03:52So I'm saying I'd like to highlight the OrderID.
03:56It doesn't automatically do that, even though it will create a link.
04:00So click Next and Finish, and it even kind of shows you the highlighted, or
04:05in-bold, version there.
04:06Now if you notice, the OrderID itself is actually just equivalent of text, 10248.
04:12It's actually trying to be a little bit too helpful here and formatting this for me.
04:16I don't really want it formatted as a number.
04:18So if I mouse over this, I'm going to get this little pop-up.
04:21It says, do I want this to format as a number? No, I don't.
04:24I'd like to just format it as text, no commas involved.
04:29When you're editing on the data form web part, which is what I'm doing here,
04:33you'll actually find this is much easier to edit than the more powerful
04:37XSLTViewWebPart.
04:39So if you're looking at an XSLTViewWebPart, you probably won't find that
04:42quite as easy to change from a number to text.
04:45Well, I'm going to go ahead and create the second connection, which is going to
04:50be from order details to the products web part.
04:55So with that one highlighted, I'm also actually going to format its product ID
04:59here, which shouldn't be a number;
05:01it should just be text.
05:03Highlight the web part. Jump to Add Connection.
05:06Yes, we want to send a row of data, and yes, we're connecting to a web part on this page.
05:12It's taken a guess that we want to go to orders, but no, we want to go downstream.
05:16We want to go to products web parts and yes, we want to, say get filter values from.
05:21Click Next again.
05:22This is where we have to match up the two.
05:24Well, I should have a ProductID in both web parts here.
05:28So here's product ID on the products web part, and I want to map this to Product
05:33ID here and click Next again.
05:37It says, do we want to create a hyperlink on OrderID? No, we don't;
05:40we want the ability to select a product and find the information about that product.
05:45So I'll say no. Let's do it on ProductID. And I will indicate that current
05:49selection by highlighting ProductID.
05:52Now, if this is not quite clear right now, it should be much more obvious when I
05:55go ahead and do this in just a second.
05:58So I'm going to finish,
06:00I'm going to save, and then I'm going to hit F12 and open this up.
06:07So we have orders on Northwind.
06:09By default, the first row of everything is hooked up,
06:12so Order 10248 is being highlighted right now, which tells me that Order 10248
06:18had three products in it,
06:191142 and 72, and with 11 highlighted, that was Queso Cabrelas.
06:25If I jump ahead to say the order 10253, I can see that was made up of three
06:30order details, which was 31, 39, and 49. And if I wanted to know what product 49
06:35was, I just select that and find that it was Maxilaku, or whatever the devil that is.
06:42So very easy to hook up all these web parts,
06:45no code involved. It just allows us to do it all through SharePoint Designer.
06:50And you could use exactly the same model to connect between data sources that were
06:55databases and web services.
06:57As long as they're old validly connect to each other, they would work just fine.
Collapse this transcript
5. Displaying Richer Data
Conditional formatting
00:00Very early on in the course, I did a brief demo of conditional formatting, and
00:05I'm going to get a little deeper into that now.
00:08The idea behind it is that we have a lot of data that we end up looking at, and
00:13unless we want to go piece by piece through all the values, it's sometimes easy
00:17to miss things that should be important, so it allows us to create rules to
00:22announce, or highlight, certain pieces of information so they make themselves more obvious.
00:27So I'm going to jump into SharePoint Designer.
00:30I'm going to do this on just a very straightforward external list.
00:34I've removed all formatting, grouping, all that kind of thing, from it.
00:39It is an external list, so I'm going to jump to my Lists and Libraries and to
00:42find the page that represents it,
00:44I'll jump into that external list and into the main view.
00:48But what I'm about to explain works on pretty much any web part that you're
00:53going to be using in a view, whether that's from an external content type or
00:57from an XML-based data source or a SOAP service or anything.
01:02So with this web part selected, what I want to do, let's say in this first case,
01:07is find this column here which is ytd_ sales, and perhaps I want to highlight any
01:14value that is more than 5,000.
01:16Now if I'm wanting to highlight an individual cell, then what I'm doing is
01:21highlighting, or formatting, a column.
01:24So I click somewhere in the column, which is ytd_sales, I come up to my
01:28Conditional Formatting entry, and I say I want to Format the Column.
01:33Now, this doesn't mean it will format the entire column.
01:36It will only format one cell, one particular intersection of a row and a
01:40column, when this condition is true.
01:43So anytime we're doing conditional formatting, there's two pieces to it:
01:47the condition and the style.
01:49So, what are the rules?
01:50In this case, what's the condition?
01:51Well, I want to say where ytd_sales not equals, but is greater than,
01:59I'm typing in 5,000.
02:02I could add more conditions after this, just like you can do filters as well, but
02:07I'm going to leave that. And then I click the button to say Set Style.
02:11You do get a lot of options here.
02:13There's font options and background options, Border and Box,
02:16all the usual things you'd expect from CSS, though I will warn you, don't expect
02:21that you can do all of these in conditional formatting.
02:23You'll find that many of them will be overwritten by the default SharePoint
02:28Style, so stick with the things that are a bit more obvious.
02:31A classic one is either changing the font or changing the background color.
02:36In this case, I am going to change the background color.
02:38We do have a dropdown here that pops up some commonly used ones.
02:43I could pick that green. That will work fine, and I'm just going to click OK.
02:48Up here, I'm going to save this file and then just hit F12 to view it in the browser.
02:55And suddenly the good sales here are announcing themselves; they're way more obvious.
03:01Okay, well that's a start.
03:03Let's take on to the next level.
03:05Let's do the counterpart of this.
03:08I'm also going to format where sales are doing badly.
03:12So again, that will be a format option which we'll apply somewhere in the
03:16ytd_sales column, so I'll make sure to be clicked in the column somewhere, and
03:21I'm looking for a value less than 500.
03:23Now, I don't have to find one in SharePoint Designer.
03:26I just need to click in one of the values and then apply a conditional
03:31formatting rule, which is to format the column.
03:34Once again, we're checking the value of ytd_sales, and I'm now interested in less than 500.
03:40I can go ahead and click Set Style, and in this case, I'll give it
03:45a background color.
03:48Well, that's a little bit too red here, so I can type a hex value, or I can
03:52click the color box here which opens the More Colors panel.
03:56I can even jump to the Custom Level and make this one a little lighter.
04:01Click OK, click OK, and OK.
04:05Save this one, and F12 to preview it in the browser, and not surprisingly, these
04:12are announcing themselves. They're a bit more obvious now.
04:16But sometimes we might want to have a different kind of behavior.
04:19Let's say this particular entry here, which is in the UNDECIDED category and has
04:24no information there.
04:25Well, perhaps I want to highlight the entire row here.
04:29Well, I can do that, too, and it's done in a very similar fashion.
04:33Again, making sure that I click back in here.
04:35Again, I don't need to find that actual row.
04:38It doesn't matter, and in fact, when you're formatting a row, you just need to be
04:42clicked anywhere, pretty much, in the web part.
04:44So I'm going to come up to Conditional Formatting, tell it to format the row, and
04:50then describe the condition, which for me is if the type is Equal to UNDECIDED.
04:56Now this is case-insensitive, although for my own purposes, I'm going to put it
05:01all in uppercase because that's the way it's written, and this is definitely an
05:05Equals, not a Greater Than or a Less Than.
05:07Now you might have seen the Advanced button down at the bottom, and this is
05:11really if you're into writing XPath and XSLT rules, you can actually define a
05:15lot more complex conditions.
05:17Most of the time you don't need them because the basic Equals, Contains, Less
05:23Than, Greater Than will do just fine.
05:25So, we'll jump on to Set Style.
05:28I'm going to show a couple of things here.
05:29I'm going to set the font and I'll change the Font Style to Italic.
05:35I'll set a background color of let's do a pale gray here.
05:40And I'll also set a border;
05:43in fact, I'm going to pick a fairly ugly border here.
05:45Let's do a dashed border style and a thick border width.
05:50That looks very ugly.
05:54We click OK. I'm going to click Save over here, and F12 to open this up.
06:00I'm doing that for a point, that my formatting options here are working
06:05correctly with this. And in italics, I've got my background color, but the border
06:09has been completely ignored in this fashion.
06:12It's basically being overwritten by something else that SharePoint is doing.
06:15So not all of your styles will work. And I find it really common that people
06:20sometimes think it's their conditions that aren't working properly when it's
06:23actually their syles that aren't being applied.
06:26So if you really want to check that something is working, try changing the font
06:30to italic or try changing the background color before you worry whether it's a
06:34background image or a border or a box style that's not being applied properly.
06:39If you want to edit and tweak your conditions and say I go back into this page
06:44and I don't know how to change them, bear mind that in Conditional Formatting,
06:48you'll find this option to Show the Task Pane, and that will make this area over
06:53here on the right pop up.
06:55Each of these can be changed, although they are in two different pieces, so if I
06:59click one of them, you'll find that both
07:01there's the Edit condition and there's the Modify style.
07:05So if I'm happy with the condition, I can just go straight into Modify style
07:09and I might as well get rid of that border style and just set it back to
07:15whatever it was before.
07:17Click OK and Save.
Collapse this transcript
Hiding and showing conditional content
00:01Another thing you can do with conditional formatting is hiding and showing content.
00:05Now, if you've clicked around a little bit and you been playing with
00:08conditional formatting, you may have tried that dropdown box and found that Show
00:12Content and Hide Content were grayed out.
00:16That's because you actually have to have something selected before they will show up.
00:21So what does this do? Well, let's say for example I want to point out when this royalty value is 20 or
00:27above, but I don't want to set a background color.
00:30I would like to inject some extra text or perhaps an icon, some kind of image.
00:36I don't want to hide and show the royalty value itself, at least not for my needs here.
00:40So what I am going to do first is, clicking in this column, I'm going to give
00:44myself another column here, because it likes to hide and show columns at a time.
00:49So with this column selected, I am jumping to my Table section of the ribbon.
00:53I'm going to say Split Cells.
00:55I'll tell it to split into columns.
00:57What I'll see is I now have a new column popping up there.
01:02Another option that I could have done there was insert a column to the right,
01:06although those tend to be very small and difficult to grab. I prefer this one.
01:10So I am going to enter in say three exclamation marks here.
01:15I could also insert say an image that I've got uploaded into SharePoint in my
01:21site assets library,
01:22but this will do for me.
01:24Selecting that text, I am just going to format it.
01:27For ease of use, I am just going to make it bold over here on the Home section
01:31of the ribbon and make it red and take the font up a little bit.
01:36So I want these three exclamation points to appear when the royalty is 20 or above.
01:42So I am going to select that.
01:44With them selected, on my Options section of the ribbon, I should find that Show
01:49and Hide Content are both available--
01:51now, whatever way makes sense to you, whether you want to apply the rules to
01:55hide the content or do you want to apply rules for when this content should be shown.
01:59Let's say I'll do for showing the content.
02:02I am going to say royalty is greater than or equal to 20. Click OK.
02:11And even in my preview, I can see that it's disappeared there for the values of 10.
02:16So I am going to hit Save and just test this. Make sure that it works in the browser.
02:24It seems to be working okay.
02:25It's a little ugly, but it'll do the trick.
02:27A very common thing that people do with this is use it to display images because
02:32instead of text here, I could have just gone to my Insert tab and inserted a
02:37picture and then chosen to hide or show the picture for indicators.
02:41So you can have the traffic lights or bar graphs or exclamation mark icons;
02:45it's up to you.
Collapse this transcript
Using formulas
00:00So we've pulled a lot of data from a lot of different sources, from XML files
00:05and web services and from databases, both as data sources and external content types.
00:10And you've probably noticed quite a few columns like this one, the price column
00:14here, which isn't all that friendly to read.
00:18It's bringing back 11.9500 when we'd probably prefer to see $11.95.
00:26And that's simply because this data is being stored internally in the
00:30database in this fashion, without the dollar sign and with four positions
00:34after the decimal point.
00:35Now to apply formatting in this kind of circumstance is one of the cases where
00:41it really does make a difference what kind of web part you have.
00:45We have talked about the XSLTListViewWebPart as being the most up to date,
00:50the most modern view web part in SharePoint 2010,
00:52but this is actually not the friendliest one when it comes to applying
00:56formatting options like this.
00:58In fact, if I switch over to an older-style web part, if I look it in XML data
01:03source here that's using the data form web part,
01:06I have got a Price column over here, and this is very, very easy to format as currency.
01:12I simply select the value or mouse over it till I see the extension glyph here,
01:17click that, and I get this option to format it as currency or a label or as a textbox.
01:23I am going to format as currency.
01:25It asks me a few questions about what I want to do here.
01:28I am just going to leave all the defaults.
01:30I click OK, and I'm pretty much done. I can save this.
01:34I can test that.
01:35I can even see here that we've got the dollar sign in front of the number.
01:40So it will be reasonable to expect that in a more up-to-date web part like this
01:44one I could do the same thing.
01:46But no, that's not the case.
01:48If I hover over price here and click that little button, the only options I get
01:53here are to Show List Item Menu and Show Link To Item.
01:58What's that all about?
01:59Well, both of these check boxes are simply about what happens when you view
02:04this in the browser.
02:05Let me show you what I mean.
02:07If we see this first column here, this title ID, if I use that same button, it
02:12does have both of them checked.
02:14And what it actually means is that when I'm viewing this page, this title ID is
02:20both a link to the individual item--close that--
02:24and it's also the dropdown menu for the different pieces of that item.
02:30So that's not going to be relevant for us.
02:32When we are working with price, we don't want either of these things going on.
02:37So I might select it and I might look around the different parts of the menu,
02:41see if there's any obvious ways to format that is currency, and there really isn't.
02:46In fact, when you're working with the XSLTListViewWebPart, we have no choice
02:51but to unfortunately use XSLT.
02:54Now that's great if it's something that's already part of your skill set; if
02:57it's not, you may find it a little intimidating to begin with.
03:00So I am going to highlight this value, so I get this XSL:value-of, and go up here
03:06to the ribbon were I've got Formula.
03:08Now there are a lot of options I get here, but they're not the most
03:12straightforward ones in the world.
03:14These are all using formulas that can be used in XSLT.
03:18And for most people, they are not that intuitive.
03:21I can jump between different functions.
03:23I can see that I have average and max and min and random.
03:27I have a group of functions for working with text.
03:30I have other functions for working with date and time.
03:33But most of them aren't all that straightforward.
03:36In fact, what we're looking at right now up at the top is what's called
03:39the XPath Expression.
03:41And this rather unfriendly looking piece of code is what's responsible for
03:44getting the current value of the current column.
03:48I need to keep that so I can actually get the value,
03:51but what I'm going to do is surround it here with one of the functions from the
03:56Math/Number area, which is format number.
03:59Format number is a function that takes a couple of arguments, so it's going to
04:04open up with an opening parenthesis.
04:07And the first thing I am going to pass in is whatever the value would have been
04:11anyway, then a comma, and then I'm passing in a string
04:15that's representing the way that it should be formatted.
04:20So I am going to use a dollar sign,
04:22and then I am going to paste in a few of the hash marks here that might
04:26represent a large number.
04:29The idea of the hash mark is, if there is a number here, it will show up; if
04:33there isn't, it won't even show up as a space.
04:35That might sound a little odd, but it makes sure that we are not getting a
04:38lot of leading zeros.
04:42And then a zero represents any number, and if there is nothing there, it will
04:47actually render out as a zero.
04:49And I did say this wouldn't be the most straightforward thing if you've never touched XPath or XSLT before.
04:54But if I click OK, then we have this back here in price, is formatting
05:01correctly as currency.
05:04We could do the same thing with advance, again highlighting this value.
05:08Moving up to Formula,
05:10I'll see exactly the same thing here.
05:12I could have actually copied and pasted the exact same formula that I had before,
05:23but I'll just write it in again here and click OK.
05:29And here I see the advance being formatted correctly this way.
05:32Now the reason I used zeroes at the end instead of the hash marks is for this kind of case
05:39where if there wasn't actually a value here or a value of zero, this is the way
05:43I would like to see it written out, rather than just a dollar sign and a decimal point.
05:48Creating formulas in XSLT is extremely powerful and will allow you to do pretty
05:55much anything you can think of.
05:56But there's certainly a fairly steep learning curve to it.
Collapse this transcript
Getting started with custom XSLT/XPath
00:00Much of SharePoint behind the scenes is using XSLT or eXtensible Stylesheet
00:05Language Transformation.
00:08This is an XML-based language, and along with something called XPath, it allows
00:12you to describe transformations to data, from something as simple as take this
00:17unformatted number and format it as currency, or format it as currency and color it
00:23green and make it italic, to complex conditions describing not just a single
00:27field, but the complete structure of entire pages, including thousands of lines
00:31of HTML and JavaScript.
00:33Now, I am not going to try and teach you XSLT in this course in the same way I
00:38wouldn't try and teach you SQL or HTML or ASP.NET in this course.
00:42If you're interested in learning more about it, you can find both XSLT and XPath
00:47in the lynda.com XML Essential Training course.
00:51But here's the thing, regardless of if you want to dive into it, you've
00:54been doing it already.
00:55You are already using XSLT in SharePoint.
00:59On the pages where I have been setting up conditional formatting to color
01:03backgrounds or hide and show content, well these are actually doing XSLT rules.
01:09If I switch into the Code view of this page and start to look through it, what I
01:14will see are these blocks of tags. This is XSLT. And for example on line 240 here,
01:21this is the XSLT to test that if the value of ytd_sales is greater than 5,000--
01:29then I am going to drag it a little to the right here--the background color is
01:33going to be set to this color.
01:35Now, if you're a web developer and good with HTML, you might be tempted to jump
01:39in and experiment with changing this code, and that's a great attitude, but
01:42here's something to be aware of.
01:44In HTML, if you forget to close a tag properly, or are a little sloppy with your
01:49code, things just still likely to work, because HTML is a very forgiving language. XSLT is not.
01:57Small typos can have an immediate impact that will stop your page from working at all.
02:02So if you do choose to dive into it, I would suggest that you go to the
02:07library that your pages are in--say you are playing around with site pages--and
02:11you make sure that the settings of the library are set to create a version
02:15each time to edit an item.
02:17You can do this either in SharePoint Designer or through the browser.
02:21You can then always revert to a previous version if things go wrong.
02:26Now, if you are an XSLT enthusiast or expert already, then you can go to town
02:32editing the templates that SharePoint gives you. And yes, any change that I
02:36make to an XSLTListViewWebPart by applying conditional formatting or hiding
02:42and showing content is going to enter some XSLT in the background in the code
02:47that I can edit myself.
02:48But that's not always it, and it's not always obvious how to get started with XSLT.
02:54So really, here is the four options for experimenting with this.
02:58Option number one is you stay in Design mode and you do everything through there.
03:03You use the ribbon to affect the changes that you are going to do.
03:08Option two is for individual pieces. You start to work with the Formula section
03:13of the ribbon and this is a controlled way of applying some XSLT options with
03:19less danger of breaking the code.
03:23Now, option three would be, what if you want to jump into the actual behind-
03:27the-scenes code itself?
03:28You want to switch to Code view and you want to stop playing around in here.
03:32So let me jump across to site pages and create a brand-new page.
03:37I am going to call it XSLT example.
03:43The reason I am doing this is just to put on this page an out-of-the-box
03:48XSLTListViewWebPart with no customization, no conditional formatting, nothing done.
03:54Now, it doesn't really matter when I insert this, what I am inserting it from.
03:59Do bear in mind that the XSLTListViewWebPart is going to be the one that's
04:03chosen for either included SharePoint lists and libraries or for external lists.
04:10If I was using database connections, they'd be using the data form web part which
04:15does itself use XSLT, but not as much.
04:19So let me click that external list, Titles on Pubs.
04:23It thinks about it.
04:24It inserts the web part. Okay, great. So what?
04:27If I switch to Code view here, what I will see is the entire page has about 108 lines of tags.
04:36If you're an HTML person, you think well, that's not really a lot. In fact, you'd
04:39start to look at some of this and think, "I could probably play around with this.
04:42I could probably edit this."
04:44In fact, the stuff that's actually highlighted in yellow you're going to leave
04:47completely alone anyway because that's nothing to do with what we want to edit.
04:52So the question is, how does 100 lines of HTML create this?
04:56Well, it really doesn't.
04:58Here's what's happening.
04:59There's much more to it going on than this.
05:01You see, because this is a completely uncustomized XSLTListViewWebPart,
05:06SharePoint is just going behind the scenes and using a much bigger default XSLT
05:12file to handle most of the processing, but I can choose to customize it piece by piece.
05:18So let's say I wanted to customize a particular item.
05:21I am going to highlight say this pub_id here.
05:25Well, the best way to get started is I go to the Design section of the ribbon.
05:29Now, bear with me here. What I am going to do is not change one of these, but
05:33over here I have a dropdown action that allows me to Customize XSLT, and I have
05:39two choices here: Customize Entire View or Customize Item.
05:44Now, let's say we start small, so I click Customize Item.
05:48It doesn't make any obvious change to the Design view, but I am going to
05:53switch to the Code view.
05:54If you remember my code had about 108 lines in it. Well, now it has about 142,
06:01because what it's done is it's inserted the part of the template that deals with
06:07just this particular item, just this particular piece. And if you do have a bit
06:12of familiarity with XSLT, this is how you might get started here, and how you
06:16might start to experiment. But it can get a little deeper than this.
06:20Let's say for example if I switch back into Design view and this is where I go
06:24to select the option to customize XSLT and tell SharePoint yes, I want to do it,
06:30another option that we have is to customize the entire view.
06:34Now, what this is effectively doing is copying all of the behind-the-scenes XSLT
06:39that's being used by this web part so we can edit all of it.
06:42It might sound like a good place to get started, but to be warned. I am clicking
06:46that button, and you see absolutely no difference in the Design view of the
06:50page. But if I go and switch back to the Code view, I now find I have 4,200
06:57lines of code here instead of the 108 I had a few minutes ago, and this is
07:03absolutely full of XSLT and XPath and HTML that's actually processing
07:10everything that's going on here.
07:11There's even a bunch of JavaScript in there, too.
07:14Now, what if I did that by accident?
07:16What if I am thinking well, I really don't want 4,200 lines of code here?
07:20I can switch back to the Design mode, highlight that web part, make sure I've
07:24grabbed it, and then in the ribbon, I am going to go to Design. But instead of
07:30clicking Customize XSLT, I will say Revert XSLT, and because I didn't make any
07:35changes, I am going to revert the entire view.
07:39Do be careful if you've done anything like conditional formatting because all of
07:43that would be ripped out if you revert the view.
07:46I click Yes. Again, no change visibly here, but if I go back to the code,
07:52we're back to the minimum amount of XSLT and my 108 lines of content instead of the 4,200.
08:00So that's really the journey of going through this.
08:03You are going to start by doing everything in Design mode, and there's a lot of
08:07stuff you can do there.
08:08We then jump into starting with formulas.
08:11We can then jump into customizing the XSLT for items and then jumping into
08:16customizing the XSLT for entire views.
08:19Now, XSLT is the way that you do very deep customization inside SharePoint, but
08:24it can be fragile, and the learning curve is deep for beginners.
08:28So if you are new to this, I would suggest first getting really good at the
08:31options you will find in SharePoint Designer first, and only then jump into
08:34formulas and custom templates.
Collapse this transcript
6. Creating Custom Forms
Creating custom forms for lists and external lists
00:00Up to this point, we've mainly been focusing on displaying data from an external
00:05source, whether that's an XML file, a database data source, multiple data
00:10sources together, or an external content type.
00:13Well, now, it comes time to talk about getting it from SharePoint back into an
00:18external source of data.
00:20However, a word of warning before we begin: many external systems will not be
00:24friendly to the idea of you using SharePoint pages to create or edit data.
00:29Often those existing applications do auditing and logging of any changes to the data.
00:34You can't just reach into the database and change it.
00:37There may be too many dependencies and relationships as well to allow you to
00:41just create a new item and have it magically work.
00:44But once again, we're actually in a situation where it's more about the demands
00:49of your external system than it is about SharePoint.
00:53But to get back into this, we have to get back to talking about views and forms.
00:57Now just to recap, if I pick a regular SharePoint list or library--I am picking
01:02the task list here--we will get at least one page to show a view of the list,
01:07and then we will get three form pages: one that can display a single item, a
01:14different page that will allow me to edit the item, and yet another page that
01:20would allow me to create a new item.
01:22Now the way I am going through this in the browser, these are popping up as
01:27modal windows with a dark background, but they are considered separate pages
01:31and can be edited independently.
01:33In fact, you can get to them even in the browser.
01:36If I go to the List section of the ribbon on any list, library, or external list,
01:42I will find a Customize List section here which has a button called Modify Form Web Parts.
01:47You may find it larger or smaller, depending on how wide your browser is.
01:53This would let you drill down into the Default New Item Form or the Default
01:58Display Form or the Default Edit Form. And if you click one of those, then in the
02:02browser you can do a little bit of basic editing. It won't let you change these
02:07fields, but it would let you rename the web part or say add a new content web
02:12part to put some explanatory text in here.
02:14Now, I am going to click Stop Editing here because there's really not much I
02:18can do through the browser, although it is accessible there.
02:23And if I switch over to SharePoint Designer, what I can do is drill down into
02:27that list and libraries and see the equivalent from this perspective.
02:31I was looking at the task library in the browser, and I'll look at the task list
02:34here, where I will see several view pages and three form pages.
02:40I see several view pages because the task list has several views by default,
02:45but we are interested in the three form pages here:
02:49NewForm, EditForm, DispForm, to create a new item, edit an item, or display an item.
02:54Now, what you will find is this is exactly the same for external lists too.
03:01If I jump to my external list that I have defined on an external content type,
03:05I have my one view page which we've been focused on up till now, and I have my three form pages.
03:12However, if I define my external content type only with Read and Read List
03:17operations, SharePoint would be smart enough not to generate a new NewForm.aspx
03:22or an EditForm.aspx.
03:25But I can't do further editing through SharePoint Designer.
03:28I am going to open the NewForm.aspx here, and I can see that we're back to the
03:34idea of having a web part--
03:36in this case, it's the XSLTListFormWebPart.
03:39But just selecting and looking up on the ribbon, I can immediately see that I
03:43have nowhere near the amount of options that I have when I am looking at a view
03:48perspective of multiple entries at the same time.
03:52And essentially, right now I cannot even click in a particular section the way I can with a view.
03:58I would be limited to clicking underneath it and perhaps just adding some
04:03explanatory text here.
04:06This web part really is a fairly big uncustomizable chunk. Even the options up
04:11here on the ribbon are standard web part options, just like the title, and
04:16whether I allow this to be minimized or closed.
04:20So I can't even add a little bit of text beside the title or the type or the pub_id.
04:26However, I can replace this web part with something that looks identical but is
04:30more customizable, and here's how you do it.
04:32So I am going to grab the web part and hit Delete and then go up to my Insert
04:37section, but instead of adding a data view that we've been doing quite a lot, I
04:41am going to come to the new item form.
04:46Now, it won't actually show me my external list right now. That's okay.
04:48I am going to come down to Custom List Form and just select that one, and here,
04:53I get a choice of more data sources. And again, all external lists are
04:57considered data sources, and this is what I am looking for is Titles on Pubs, and
05:02yes, we want to create a new item form, and click OK.
05:06Now that didn't appear to do very much different. This looks identical to the
05:11one I had a few seconds ago, but this time around I can actually jump into it.
05:16I can start to say add some extra text beside the title or the type that
05:21explains what the choices are.
05:23However, if you are concerned about customizing this web part and you're worried
05:27about messing things up, well here's what you can do.
05:30I am going to revert back to what we have before. In fact, because I have made
05:33some changes and I haven't saved them, all I am going to do is come out of this
05:36page and say I don't want to save my changes.
05:39To allow me to experiment, I am going to create another entry page.
05:45So I have gone back into my Lists and Libraries section and into this external
05:48list page, and down here in the Form section, I am going to make a new form.
05:53I will call it NewForm2.aspx; it is a new item form.
05:59I will leave this box unchecked to set as the default form for the selected type.
06:04So we'll still be using the old one.
06:06I can just edit this and experiment with it and play around with it for a while.
06:11So NewForm2.aspx is there.
06:13Now if I open that one, the way the web part has been added to this page is it
06:18is immediately editable.
06:21So I can actually click in and start to type some extra text or move things around.
06:25For example, I know that with pubdate at the end here, this actually has a
06:29default value in the database,
06:31so perhaps I don't want to have an entry here.
06:34I am actually going to delete that, and then I am going to hit Save and F12 to
06:42open it up in the browser.
06:43Now, SharePoint is going to do its best to recognize required fields in an
06:48external content type and display them as such, which is why these three first
06:53fields are marked with a red asterisk, which means they are required. But I
06:58could start typing things here for say the title_id and the title and the
07:03type, even making my best guess as to what those means. But say we come down to pub_id.
07:08Now, this is the publisher ID, and this is really just a link to a different
07:14table of data in the database.
07:16Now, I can see that I am not getting an automatic dropdown box or some kind of
07:21lookup table here for references to another source of information, because after
07:26all, SharePoint right now doesn't know about that relationship.
07:30That relationship might be defined in the database, but the only thing we ever
07:33told SharePoint about was this titles table.
07:37Now, we can tell SharePoint about a relationship, as we'll see in a minute, and we
07:42can have a much better-generated form.
07:45But we could experiment with this form for a while. When we were done with it,
07:50and we finished with it, and we wanted to make this one the default, we would go
07:54back to our main page for this list or library and then just select that form.
07:59And I am actually clicking the row here, not clicking the name itself, which
08:03would jump into that, just highlighting it, and then I can move up here on the
08:07ribbon and say Set as Default, and that would be the default form for a new item.
08:13But after a while, you will unfortunately find out that this particular web part
08:17to display a single item is not really all that friendly to being customized
08:22that much, and if you want to go deeper, InfoPath will be your best choice, and
08:27we'll explore that in a few minutes.
Collapse this transcript
Creating custom forms for data sources
00:00Unfortunately, when it comes to working with data sources, such as XML files,
00:06SOAP services, RSS, or REST services, you're more limited to the forms you can
00:11create and customize.
00:13You are pretty much stuck with the standard New Item, Edit Item, and Display
00:16Item Forms, rather than groovy InfoPath content.
00:20To do this, you're going to simply create a new page in your Site Pages library.
00:25Let's say I'll create one here and call this northwindEntry.aspx.
00:33I am going to make this an Add Item Form for the Northwind products table.
00:39I jump into it and click Edit. Nothing is automatic about this.
00:42This page has not been automatically generated, but clicking here in the
00:46placeholder, I can then jump up here to the Insert tab and I have my choices of
00:51New Item Form, Edit Item Form, and Display Item Form.
00:55I am picking New Item here.
00:57I'll come down to Products on Northwind.
01:01This is a regular database data source connection rather than an
01:05external content type.
01:06Now, it's taken a guess here and it's not added all of those fields.
01:11It's just added these first five.
01:15If I wanted something different, I would delete this data form web part, then
01:19come over to my Data Source details, select the fields I was interested in
01:24adding, and then choose to insert them as a new item form.
01:28I don't need to do that right now.
01:30This one is fine for me.
01:31In fact, I know that product ID is generated automatically when a new item is
01:37added to this table,
01:38so I am actually just going to select this row and delete it because we don't
01:42need to be attempting to enter in a product ID.
01:46I could then save this and just hit F12 to open it up, and very bland as it is,
01:53we could add some new information here about a new product.
01:56Let's say I know that there is a SupplierID 1 and a CategoryID of 1, and let's
02:02say this comes in quantity per unit of 12.
02:05I hit Save, and it will be writing back to the Northwind database.
02:09As you can see, this is a fairly bland interface and unfortunately, there aren't
02:14a lot of customization options here for data sources.
02:17And unless you want to get into the XSLT, most of what you can do here is
02:21limited to informational text. Even the fact that I can highlight this web part
02:26and see a bunch of options up here doesn't really make much sense during
02:32sorting and grouping and filtering or even conditional formatting when it's just
02:36a single-item entry at a time.
Collapse this transcript
Creating associations in Business Connectivity Services
00:00Very often the external data that you're working with has a dependency on
00:04something else, a relationship to something else on that external system.
00:09For example, I am viewing some information here about titles.
00:12This is coming from an external content type, and I see that I have a pub_id column.
00:18This is really just a reference, a relationship to a publisher's table on that same database.
00:26This isn't all that important when we're just reading some of this data, but
00:30when we're inserting information, it's doubly important.
00:33We really need to understand more about what this means.
00:37If I'm entering a new item here, I need to know what pub_id to put. And if I get
00:44this wrong, the database won't even let me insert it, based on the internal
00:48rules of the database.
00:49Now, while that relationship might be defined in the database itself, we haven't
00:55told SharePoint about it, and SharePoint will not automatically understand that
00:58relationship until we tell it to.
01:00So here's how we do this.
01:01I am going to jump over here to my External Content Types, which is where I have
01:06my connection to the Titles table defined.
01:10Well, the relationship in the database is between the Titles table and
01:14the Publishers table,
01:15so what I'm going to do is add another external content type here.
01:19This one will be called Publishers.
01:21I am leaving everything else as I left it when we first defined our first BCS
01:28external content type, and now I am going to click the link for external system.
01:33Because I've defined a connection to that database, it already exists here.
01:38I can see the pubs database in my Data Source Explorer.
01:42What I am going to do is expand Tables, and I know that what I'm interested is
01:46here, this Publishers section.
01:49I could right-click and choose to create all operations for reading,
01:54writing, updating, deleting.
01:57Let's say I know that I just want to use this as a lookup,
02:00so I am going to create the two most basic operations that we always need, which
02:05is Read Item and Read List. And if you forget that, it will even tell you over
02:10here that you can't save that content type without Read Item and Read List.
02:14I am just going to click next through the Read Item.
02:18I have a fairly simple database here, so I am not paying too much more attention
02:23to that. And then I'm going to right- click and say Read List Operation.
02:28This means if I made an external List based on this external content type, I
02:33would not automatically have the pages generated to add or edit anything on it.
02:38I am going to click Finish, and then I'll hit Save.
02:43I now have two external content types defined, but there's still no
02:48relationship between the two.
02:50Well, what that's called in BCS is an association, and the way that I create it
02:55is go into the child, if you think about it this way.
02:58I'm going into the Titles section, where we could have many titles for one
03:04publisher. And although this has already been defined with all the operations
03:09for it, I need to switch into the Operations Design view up here on the ribbon,
03:15and what I'm going to do is say, I am going from titles to publishers, so I am
03:19going to right-click Publishers and create a new association.
03:24I am getting a warning down here that I must select a related external content
03:30type to associate with the current external content type. Okay, fine.
03:33I have got the button called Browse up here, which tells me I am currently in
03:37the Book Titles content type, and the one I want to connect to is of course,
03:40Publishers. Click OK.
03:43I check here that they're trying to match up on pub_id, which is what I want them to do.
03:47So I am going to click Next, and it's asking, what will be defined as input
03:52to the association?
03:54And the warning saying select the data source element that represents pub_id.
03:58Well, it is pub_id, so I'd check the box to say Map to Identifier.
04:02I am just going to ignore this warning right now because I know this one works just fine.
04:06I don't need to do any filtering. And then it's asking, what gets returned
04:11from this association?
04:12If I have a pub_id, do I need all the other bits of information?
04:16And I'm going to say yes. Really, I don't.
04:18I could uncheck city, state, and country, and just say if I have pub_id, I am
04:22really just interested in the name, but I will leave that all as is.
04:26The only thing I do need to select is say the pub_id is the important one here.
04:29So I am checking that Map to Identifier box, and click Finish.
04:35Then that defines me the association.
04:38I am going to click the Save button here to save it back into SharePoint, and
04:41it's the equivalent all creating a relationship in a database, but we're
04:45creating an association in business connectivity services.
04:49Now, the question is, so what?
04:53Well, here's the difference.
04:55I am going to go back into the browser right now.
04:58I'm going to show you what I would have gotten a minute ago.
05:02I'm using this external list, Titles on Pubs, which was created a while ago, and
05:08if I go to the List tools and I say I want to make a new item, I get this
05:13standard entry with that issue with pub_id, that we better know exactly what
05:18digits to type in here, even if they are not obvious. Okay.
05:22So what I'm going to do is go back into SharePoint Designer.
05:26I'm going to jump into that external list, and I'm going to delete it.
05:30Now, I am not deleting the external content type, what I'm deleting is the list
05:34based on the content type.
05:36That doesn't delete any data;
05:38it's just the List Pages themselves.
05:41Now, if I had customization, conditional formatting on my views, I would lose
05:45all of it right now.
05:47But I know that anything I did I can get back in just a few minutes.
05:50So I am going to re-create that external list from Book Titles and give it
05:55exactly the same name, but because now this list was defined with an association
06:03to another content type, we're going to get something slightly different.
06:06If I jump back into the web site--and I'll just refresh this--
06:12it looks exactly the same.
06:13I have the List Titles on pubs because I gave it the same name, and this looks identical.
06:18But now I am going to come to Items and click New Item.
06:22It looks similar till we get to pub_id, which is missing from here. But down in
06:28this section, we see Publishers, and I have the link automatically being
06:33generated based on the association.
06:36So I could create a title ID of AB1234, Some new book, Type is Business,
06:44Price is 12.99 let's say.
06:46I'll leave the rest as is.
06:48I could even select the Publication Date, the 6th of April, and then I have an
06:53external item picker.
06:55What it allows me to do is click this Select External Items box and it pops
07:00up looking for all my publishers. In this case I want Ramona Publishers, which is 1756. Click OK.
07:08It then copies that ID back into my Titles section and I can click Save, and
07:15I've added that new title linking to that pub_id correctly.
07:18So yes, it did require me to blow away and recreate my external list to get
07:23that new page happening automatically, but this is a great reason to really
07:27consider your sources of external data and figure out all the external content
07:31types required before you start creating your lists and customizing your pages.
Collapse this transcript
Creating custom forms with InfoPath 2010
00:00When working with SharePoint lists or libraries--and that includes external
00:04lists from external content types--we have the option of replacing our default
00:09HTML-based forms with InfoPath-based forms, which gives you a much more
00:13customizable entry and display screen.
00:16We will still be using web pages;
00:17we're just embedding some InfoPath inside them.
00:20And one thing a lot of people are worried about is, what does that mean for our end user?
00:25Well, really nothing.
00:25The end user does not need InfoPath installed on their machine to use those
00:31pages, but you will need InfoPath 2010 to edit them.
00:34So, here's how you do it.
00:36I am going to start off by showing an example with one of the
00:39built-in SharePoint lists.
00:41I will pick say the Announcements list, and we will see here the classic one
00:46view and three entry forms.
00:48Well, up on the ribbon here, I have got a Design Forms in InfoPath button, which
00:53always gives me a dropdown with typically one option.
00:56I need to click that one option for Announcement here. And then what's it's
01:00doing is it's opening up InfoPath and converting that web-based form into an InfoPath form.
01:07It starts off by looking fairly similar to the web-based version, but the point
01:12of InfoPath is we can go to town on this.
01:14We can do a lot more to it.
01:16We can start affecting the page design;
01:18there is a bunch of page layout templates and themes that we can apply quite quickly.
01:24We can insert richer tables than we have the option of doing in SharePoint
01:28Designer quite a lot of the time.
01:29And we can apply rules to that content.
01:33Now, I am not going to change this one because I am going to do this on an
01:37external list in just a moment.
01:39But the most important button that you have after you are done editing this
01:44in InfoPath is the Quick Publish button that's up on the top-left of the InfoPath 2010.
01:51This essentially takes it from your desktop back up into SharePoint and says,
01:55okay, open the SharePoint list in the browser and now we are back to the
01:59Announcements list. But if I want to add a new announcement, I've still got the
02:02modal window, but I can kind of tell that it's not HTML anymore.
02:06It's this InfoPath mode internally.
02:16And we have exactly the same model if we are working with an external list.
02:20So I am going to click back on my List and Libraries, find my external list,
02:23which is Titles on Pubs, and then come up and click the Design Forms in InfoPath
02:29button selecting Item, which is the only option here.
02:33It thinks about it for a second.
02:35This is a bit more complex data, so it might take a few more moments to read all
02:39the data from the server, and then it opens up that form in InfoPath.
02:45We can decide to come in and say give it a title, select that, use the elements
02:53of the ribbon to change the style.
02:56I could add obviously some informational text here,
02:59but the title_id should be in the format two letters and four numbers.
03:07Select that text and just use the ribbon to make it a little smaller.
03:14Come down, title looks okay, and we hit type.
03:17Now type is the category of the book, as this particular database is defined,
03:22things like business, psychology, popular computing, and so on.
03:26So I can type that in directly, but it would be nice if we had say a
03:29dropdown list here.
03:31So what I'm going to do is right-click the Type field and select to change the
03:36control to--well, I have Drop-Down List Box, but I am going to pick Combo Box.
03:40A combo box is a control.
03:42It's quite difficult to implement on the web, but it works just fine here.
03:46It allows me to have a bunch of values to select from and still have the option
03:50to type my own value if I don't like any of them.
03:53Well, with that selected, I need to give it a few values.
03:57I can either select it and come up to my control tools on the ribbon, or I can
04:01double-click it which would take me to the same place.
04:04Then I have an Edit Choices button.
04:06Now while this combo box does give me the options of entering choices manually,
04:11and then I have this very tempting Get choices from an external data source,
04:15I will let you know that when you are creating InfoPath forms for external
04:18content types, it's not very fond of external data sources and really will do
04:23its best to not let you have that.
04:25So I am just going enter a few choices manually here.
04:28First one will be Business.
04:33I will click Add again.
04:36Psychology, and then another one was Popular_Comp.
04:42I'll leave it at that because of course a manual value can be typed.
04:49I come down to pub_id, and I can tell that I have the pickers here for external data.
04:55That's because I have described the association between this external content
05:00type and the publisher's external content type.
05:03So we are good here.
05:04Coming down to price, well let's show an example of the equivalent of
05:08conditional formatting here, which can be done even on the way in.
05:12I am going to select Price and come up to the Add Rules section.
05:16I get several rules to choose from, if This Field Changes, if it's Between
05:20certain values, if it's Greater Than, Less Than.
05:22Well, let's say if this price is Less Than a certain amount, I want to format it as Good.
05:28So first I choose what I want to do, and then it says okay, what is the rule?
05:33I will say price if less than 20.
05:35Click OK and then jump down to advance and let's say we will do the flip side of this rule.
05:40If advance is greater than, we want to make it Bad, and let's say if it's
05:44greater than 20,000. Now, these rules will be applied as we're typing.
05:49If we type into price and hit Tab out of it, we will actually get the rule applied.
05:54You can have multiple rules on the same field, so you could have price showing
05:58up in green or neutral or red. Same with advance.
06:02I am just applying one to each.
06:03Coming down to notes here,
06:05well, I would like that to be a bit more room,
06:06so I am just going to drag the cell of the table beneath it and drag it a little
06:11wider--very easy to do this in InfoPath.
06:15And then come down to pubdate.
06:17Let's say I know that putdate is actually going to have a default value when
06:20it's inserted into the database, so I am just going to strip that right out and hit Delete.
06:24I am sure I could play around a little more.
06:28I could start to work with themes and other designs and so on.
06:33But I am going to leave it at that and click my Quick Publish button.
06:39Now what might happen here is it might ask me to save. Yes, it does.
06:43This from template must be saved before it can be published.
06:45And this is actually giving me the option of saving it to my own Documents
06:49library, so I have my own copy here.
06:51I will call it bookTitle.xsn.
06:55However, that's just saving me a local copy so it can then persist and push it
06:59back up into SharePoint, which is what it's doing now, and it's telling me that my
07:03form template was published successfully.
07:06I'll open that up in the browser, and we have this nice InfoPath from Book Title,
07:11title_id should be in format xx0000.
07:14I start typing and now unfortunately, I have a problem here.
07:18Now, this is quite common.
07:19See, InfoPath will often make the guess that the ID, the identifier of a database,
07:25will be automatically generated so it should be Read-Only and that's
07:28what's happening here.
07:29Let me just close down my browser. Close those tabs.
07:32Go back in because I still have it opened in InfoPath, and if I select that field,
07:37I guess it will be, yes indeed, clicking on control tools, tell me that it's
07:41selected as Read-Only.
07:42I just need to turn that check box off and open it up in the browser, and now
07:48let's give it a title_id of AA5432.
07:52Title is Data Driven SharePoint.
07:56You can even have spelling and auto correction on your fields from an InfoPath form.
08:02As I mouse over, this is saying the type cannot be blank, but if I drop down,
08:06I've got the ability to select the Popular_Comp type.
08:10If I don't remember what the publisher ID is, which is unlikely, I can click
08:13this button here, which is going to read the association, bring back the list of publishers.
08:18I will say this one was Five Lakes Publishing in Chicago.
08:21We will give it a price of 14.99.
08:25As soon as I tab out of this, the rule is applied, and it says yes, that's good.
08:29Advance was 24,000.
08:31The rule is also applied and says yes, that's bad.
08:34It's not preventing me from saving this.
08:37It's just highlighting those values to point them out.
08:40If you want to apply a rule or a condition that would prevent you from filling
08:44out this form, you can do that, too, in InfoPath.
08:46I will say royalty is 10.
08:48I will leave ytd_sales, and notes is new SharePoint 2010 book.
08:53And once I'm done, I'll come up here and click Save.
08:58It sends the data to the server, and it's now saved.
09:01If I go back to my site, and look at Titles on Pubs, I should see that information--
09:06there we go--actually entered in there as Data Driven SharePoint.
09:12Now as you might imagine, the better you get at InfoPath, the more customized
09:17you can make these forms.
09:18You can have conditional sections.
09:20You can have multiple rules combining together.
09:23But even here, it's been a very simple matter to quickly create a more useful
09:28format than the default one.
09:31Now unfortunately, this is only an option for built-in SharePoint lists and
09:34external lists based on external content types, and is not available for a data
09:38source like XML or SOAP-Based connections. But if you have those external
09:43content types, it's a great way of improving the user experience.
Collapse this transcript
Conclusion
Resources
00:00In the past couple of hours, we have gone through a great deal of information.
00:04We have gone through data sources, working with external content types, and
00:07business connectivity services, gone through multiple complex web parts,
00:12external lists, the Secure Store Service, custom-entry forms, and InfoPath, and
00:17there are many areas that you could run with this technology.
00:20You won't need it all, or at least all at the same time, but you should now be in
00:23a position where you can identify what it is that's going to give you the most
00:28benefit in the short term, and run with that.
00:31Now, bear in mind that the Help system in SharePoint Designer, which you can get
00:35just by hitting F1 at anytime, can be a great reminder of some of this stuff,
00:40particularly when it comes to things like the differences between what the
00:44different view and form web parts can and can't do.
00:47Now, while as you've seen, experimenting with deep customization in SharePoint
00:52is going to have you playing around with some XSLT behind the scenes, it's not
00:57always the easiest thing to do because there aren't a lot of great resources about this.
01:02But one place to bear in mind, if you are getting into it, is the SharePoint
01:062010 Designer forums.
01:08These can be a little tricky to find sometimes, but you can search for that.
01:12What you don't want to search for is the phrase 'SharePoint forums'.
01:15You want to make sure that you're searching for 'SharePoint 2010 Designer forums'.
01:22Even then, the first link that you will find is quite likely to be the
01:25Pre-SharePoint 2010 one of them.
01:27But there is a forum on msdn.microsoft.com about using SharePoint Designer,
01:32InfoPath, and other customization, and there are some often some really good
01:37tips and tricks to be found here.
01:38Now, if you're working with the Secure Store Service when you're working with
01:43your content types, really step one there is to talk to your sysadmin and make
01:48sure that that has been set up if you're interested in creating secure sets of
01:52credentials for each of your external content types.
01:55But otherwise, my best suggestion is really simply to experiment.
02:00Experiment with the other web parts, experiment with creating multiple pages,
02:04and connecting web parts together, and trying to connect different data sources
02:08together. And play around with the different formatting options in SharePoint
02:12Designer that you will find.
02:13There is a lot that can be done through this without having to dive into XSLT first.
02:18But good luck with your data-driven pages in SharePoint.
Collapse this transcript


Suggested courses to watch next:

Excel 2010 Essential Training (6h 21m)
Bob Flisser


Word 2010 Essential Training (8h 3m)
Gini Courter


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,069 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked