Clayton's SharePoint Madness

All About SharePoint, InfoPath, and SharePoint Designer!

Archive for the ‘SharePoint 2010’ Category

Things related specifically to the brand new Microsoft SharePoint Server 2010

InfoPath – Allowing Anonymous users to Submit Forms in SharePoint 2010

Posted by Clayton Cobb on June 3, 2011


You all know how much I like InfoPath, so you probably know how much it pained me not to be able to provide InfoPath forms to anonymous users in SharePoint 2007. For one, you don’t want to use a Filler form, because it’s a guarantee that not every anonymous will have InfoPath installed locally. However, even if we used browser forms, anonymous users are not allowed to submit documents. There are some permissions hacks for working around that to some degree, but they are not recommended. There is another method where you can set up a web service submit to use the Lists.asmx web service for submitting the data from the form to a list without actually submitting the InfoPath document (XML). S.Y.M. Wong-A-Ton has a great article showing 5 ways to submit to lists from library form templates: 5 Ways to submit an InfoPath form to a SharePoint list.

So, the good news is that we now have a brand new feature in SharePoint 2010 that allows us to utilize InfoPath as LIST forms. This is an amazing new feature, because people have been customizing their ASPX list forms for years with SharePoint Designer, but it was nowhere near as easy nor as powerful as using InfoPath; however, there was no way to use InfoPath directly for list forms. That has all changed, because now we can do it. Because of this, we can also allow our anonymous users to submit customized InfoPath forms without any custom web services, without the need for code, without any permissions hacks, and generally without any fuss at all. In this blog post, I am going to show you how – it’s very easy.

***Warning: InfoPath list forms are ONLY available in SharePoint Server 2010 Enterprise, because they are considered browser forms. Of course, this is the same for library-based browser forms, so this would be no different if trying to use library forms.

Here are the major steps we’ll cover:

  1. Configure a SharePoint site to allow anonymous access
  2. Create a Customers List that allows anonymous submits
  3. Convert the list to InfoPath
  4. Create a custom page for anonymous user interaction with the InfoPath form

Configure a SharePoint site to allow anonymous access

  • First, you need to enable anonymous access at the Web Application level by browsing to Central Administration > Application Management > Manage Web Applications. In this example, I have a new web application named “Anonymous,” and I have set it to allow anonymous access (Fig. 1 and 2).

Figure 1 – Managing the “Anonymous” web application. Click Authentication Providers in the ribbon

Figure 2 – Enabling anonymous access for a specific zone in a web application

  • Next, you need to enable Anonymous Access on a site within the above web application. If you created a new web application, then create a new site collection. If you modified an existing web application, then either create a new site collection or browse to a site on an existing site collection. Once you decide where you want to test this, browse to that site and click Site Actions > Site Permissions. Then, click the Anonymous Access button in the ribbon (Fig 3).

Figure 3 – Enabling Anonymous access at the site level

Figure 4 – Choosing the scope of access for Anonymous users

  • At this point, you should be able to browse to this site without getting prompted to log in even if you do have the ability to authenticate. Instead of seeing your name in the top right corner of the page, you should see a link that says “Sign In.” (Fig. 5)

Figure 5 – Browsing to a SharePoint 2010 site anonymously

Figure 6 – Result of signing in to the same site as an authenticated user

Create a Customers List that allows anonymous submits

This is just an everyday activity in SharePoint, but we need it in order to show the solution.

  • On the site from above, create a new Contacts list named “Customers.” (Fig. 7)

Figure 7 – Creating a new Contacts list on the Anonymous site

  • Go to the List Permissions and stop inheriting permissions first (Fig. 8)

Figure 8 – Breaking permissions inheritance on the Customers list

  • Now, allow Anonymous users to Add items (edit and delete are optional, but not recommended). (Fig. 9, 10, and 11)

Figure 9 – Clicking the Anonymous Access ribbon button after breaking permissions inheritance

Figure 10 – Adding the “Add Items” permission for Anonymous users on the Customers list

Figure 11 – Results of giving Add Items permission to Anonymous users

  • Now, your anonymous user should be able to add an item to the Customers list (Fig. 12).

Figure 12 – View of Customers list as an anonymous user

Convert the list to InfoPath

  • Now, we get to use the awesome new feature of InfoPath Forms Services that allows us to modify list forms with InfoPath. You must be logged in as an authenticated user to do this, and you must use Internet Explorer to invoke it from the ribbon or from the List Settings > Form Settings page. You can also invoke this change from the list settings page in SharePoint Designer 2010. (Fig. 13, 14, and 15)

Figure 13 – Converting the list to InfoPath in the Customize List section of the List Tab of the List Tools ribbon

Figure 14 – Converting the list to InfoPath in the List Settings > Form Settings

Figure 15 – Converting the list to InfoPath in SharePoint Designer

  • When doing any of the above, a new InfoPath list form template opens on your local machine, so be sure you have InfoPath 2010 installed. The template will have a basic table with all the list columns displayed. Likewise, all the fields are visible in the data source pane on the right (Fig. 16).

Figure 16 – Default list form template for the Customers list

  • Now, you can customize the form to make it look how you want, and you can even add data connections, but just be sure the users have permissions to the source of those data connections. My form below has a banner image, a thinner table for the default fields, a custom submit button, and a few repeating tables for showing secondary data from other lists on the site (Fig. 17).

Figure 17 – Customized InfoPath list form template for the Customers list

  • Notice that the anonymous user is able to open this form by clicking “Add new item.” I purposely right-clicked and chose “open link in new tab” to avoid the modal dialog, because you wouldn’t be able to see that the user is anonymous (Fig. 18). Notice also that the two repeating tables on the right are both populated with data from other lists (tasks list and the same Customers list).

Figure 18 – Customized list form opened by an anonymous user

  • Notice below how I am an anonymous user, and I can see items submitted by both authenticated users and anonymous users (Created By is blank).

Figure 19 – Viewing list items submitted by authenticated and anonymous users in the Customers list

Create a custom page for anonymous user interaction with the InfoPath form

So, you can already see that anonymous users can easily submit to lists using InfoPath forms, but I’m going to show you one more step so that you see it can all be done through the InfoPath Form Web Part through a guided interface instead of the user going directly to the list.

First, let’s create a custom page with nothing on it except the InfoPath Form Web Part. This part of the blog is something I just now built to demonstrate, so it has no design elements at all – I’m just showing an example – but you can probably get very creative for your anonymous users so that they only see what you want them to see.

  • To create the type of page I’m using, open the site in SharePoint Designer 2010, click on the Site Pages Site Object (left navigation), and in the ribbon click New > Page > ASPX. This creates a new, blank page with nothing on it.
  • Click on the page to get to the page settings, and then click Edit File.
  • In the ribbon, click Web Part Zone in the Web Parts section
  • Put your cursor inside the Web Part Zone and click Web Part > More Web Parts. Search for the InfoPath Form Web Part and select it
  • Now, you should have a blank page with an InfoPath Form Web Part inside a Web Part Zone (Fig. 20)

Figure 20 – Blank ASPX page with a single Web Part Zone containing a single InfoPath Form Web Part

  • Now, right-click on the web part and click Web Part Properties
  • This will show you the InfoPath Form Web Part properties so that you can connect it to the Customers list. Notice that I have disabled the ribbon so that the user can only utilize my custom Submit button, and I have configured the submit behavior to open a new (blank) form upon submit. What this does is insert the data to the list and then present the user with a fresh, new, blank form (Fig. 21).

Figure 21 – Configuring the InfoPath Form Web Part to utilize the Customers list form

  • Now, you just save the form and send that page’s direct URL to the anonymous user.
  • When the anonymous user clicks on the link, this is the result (below). Notice the page opens in the browse with nothing else visible – no ribbon, no master page, no border or other miscellaneous indicators (Fig. 22). You could also add other web parts – either hidden or shown – that are connected to this form for input and/or output purposes, such as a Query String Filter Web Part that could read from the URL and insert that data to the form, which could then trigger rules and/or switch views to provide a personalized experience.

Figure 22 – Opening the Customers list form as an anonymous user through a custom page

Since there is no indicator in Figure 22 for which user that is, I am providing a bonus screenshot below that shows the same technique utilized on the Home page of my Anonymous site (Fig. 23).

That’s all there is to it. This is very easy to set up and works very, very well. Unfortunately, items submitted by anonymous users can’t automatically trigger workflows, so I’m hoping that will either be changed in the future or that we’ll be able to figure out a way (without code). Even so, this gives you a great way to provide a powerful, nice-looking interface to your anonymous users so that they can submit data using a logic-filled form without the need for custom code or any heavy customization.

Posted in InfoPath 2010, Office 2010, SharePoint 2010, SPD 2010 | 15 Comments »

Solving Business Problems with SharePoint and InfoPath

Posted by Clayton Cobb on April 26, 2011


How business users can solve business problems by collecting and managing data more effectively

Using SharePoint and InfoPath

  • FirstLook-InfoPath (PowerPoint slides from the presentation)
  • Video of presentation coming soon

This Free First Look Clinic will be held on Friday, April 29 starting at 9:30am until 2pm at the LeaderQuest facility in Denver.  This clinic will be taught by Clayton Cobb of Planet Technologies.

Although InfoPath has been a part of the Office since the 2003 version, most people haven’t even known it was on their desktop.  Now, though, with the release of both Office 2010 and SharePoint 2010, the importance of utilizing InfoPath has grown to the point that people are finally starting to take notice.  InfoPath is embedded all over the SharePoint 2010 product as well as other Office 2010 products, which makes it an invaluable tool to learn whether it be as a developer of forms and solutions or as a user who understands that this tool can be considered when determining different ways to resolve business issues.

Clayton Cobb, a former InfoPath MVP and current SharePoint MVP, will walk us through what these two products mean to each other.  You will first learn what InfoPath is by looking at it directly, building a  simple form, and talking about the basic features.  From there, we will see how to integrate this form with SharePoint 2010.  After that, we will delve deeper into the other integration points between SharePoint and InfoPath. Lastly, we will walk through a multi-system-integrated, multi-product, fully-automated Leave Request system built on InfoPath and SharePoint 2010 as the main platform without a single line of code.

Posted in InfoPath 2010, Office 2010, SharePoint 2010, SPD 2010, Visio 2010, Workflow | 14 Comments »

SharePoint 2010 – How to open files that prompt for Save or Cancel

Posted by Clayton Cobb on January 7, 2011


This problem has arisen quite a bit since the release of SharePoint 2010. On the MSDN forums, there are many questions that seem new, but they always end up coming down to one setting. In SharePoint 2010, there is a new setting at the web application level called Browser File Handling (Fig. 1). You get to this setting with these steps:

  • Central Admin > Application Management > Manage Web Applications
  • Single-click the row of your web application
  • Click General Settings in the ribbon
  • Scroll down to Browser File Handling and select Permissive

Figure 1 – Browser File Handling settings

By default, this is set to Strict when creating a web application. However, this causes issues in many ways related to opening certain files from SharePoint. The most obvious example is with PDFs. When set to Strict, a PDF can only be Saved (downloaded), but in Permissive mode, the PDF can be opened directly. For instance, here are the different results when clicking on a PDF in a SharePoint 2010 Document Library:

Figure 2 – Opening a PDF in Strict mode

Figure 3 – Opening a PDF in Permissive mode

As you can see, in Strict mode, I am prompted to Save or Cancel (Fig. 2). In Permissive mode, the PDF immediately opens without being prompted (Fig. 3), and in my case, my PDFs open in the browser by default (this is a setting you can change).

Another way this issue manifests itself is when opening versions in an InfoPath form library. Someone posted this issue on the forums, and when I didn’t experience the same issue, I immediately thought of Browser File Handling. Mine was already set to Permissive, so I switched it to Strict, and I experienced the same issue. Switching back to Permissive fixed it. Here is the scenario:

Figure 4 – Form Library set to Open in the Client (not browser)

Figure 5 – Form Library set to Create major versions (max 2)

Figure 5 – Check the Version History of an individual form and click on an older version to view it

Figure 6 – Result of clicking an older version in Strict mode

Figure 7 – Result of clicking an older version in Permissive mode

As you can see, when in Strict mode, the browser views this as a regular XML file (Fig. 6) and doesn’t associate it with InfoPath like it does in Permissive mode (Fig. 7).

Posted in SharePoint 2010 | 3 Comments »

SharePoint Designer 2010 Workflow Actions and Results

Posted by Clayton Cobb on December 12, 2010


A list of SPD2010 Actions, what they do, and their different results.   There are tons, so I’ll keep adding more as I go along…

Date/Time Field

Sample Value: 8/2/2010 12:00 AM (Mountain Daylight Savings Time)

Format Options:

  • As String:    8/2/2010 12:00:00 AM
  • ISO Formatted:    2010-08-02T06:00:00Z (Zulu – GMT)
  • Long Date:    Monday, August 02, 2010
  • Long Time:    12:00:00 AM
  • Short Date:    8/2/2010
  • Short Time:    12:00 AM

People Picker Field

Environment Details:

  • Claims Mode Web Application
  • Windows Authentication
  • Default Created By field
  • Sample Value: Jackson Cobb (Hyperlinked Display Name)

Format Options:

  • As String:        i:0#.w|warr\jcobb
  • Display Name:        Jackson Cobb
  • Email Address:        jcobb@warr.com
  • Login Name:        i:0#.w|warr\jcobb (this is the true, underlying XML value of a Claims Mode People Picker field)
  • User Id Number:    16 (This account was the 16th to be added to the User Information List for this site collection. This is driven by an entry into the UserTable of the content database within which this site collection resides)

User Profile (Data Source)

Posted in SharePoint 2010, SPD 2010, Workflow | 10 Comments »

MSDN Forums SharePoint Task Force – A Call to Arms!

Posted by Clayton Cobb on August 16, 2010


**As a reminder and point of emphasis, this is not just about sheer numbers, but rather it is about increasing the quality of the forums for everyone involved, including ourselves. If we work hard, then the numbers will come, but we are not looking to purely add posts to the forum. We only want to see meaningful, well thought out responses that help the online community – both the thread creators and the rest of us who read the threads. Thank you!

**1st milestone update on 9/1/2010. It’s only been 2 weeks, but I’m doing a pulse check to see how we’re doing. I think the results are amazing so far!

**2nd milestone update on 11/7/2010. It has now been just under 3 months, and the impact has been huge. There have been more answered threads in the last 3 months than in all previous months combined before we started the Task Force. It’s absolutely not just due to the Task Force, but I believe we have helped spark a major upswing in quantity AND quality of responses…

Special Kudos to these Task Force members:

  • Steve Curran, Corey Roth, Dave Hunter, Alpesh Nakar, Spence Harbar, John Ross, John Ferringer, Wictor Wilen, and Todd Wilder for all busting their tails to rack up over 500 points (honorable mention to Roland White for 499!).

In 3 months of work, here is the impact so far:

  • Each of the 4 SP2010 forums have an increased answer rate of over 10 percentage points with SPD/InfoPath rising over 15 percentage points
  • All 4 SP2010 forums are over 50% in answer ratio when none were over 45% when we started. 2 of the 4 are almost up to 60% overall.
  • Each SP2010 forum has had a significant decrease in # of threads with no replies. The Visual Studio forum has dropped the most – by 5.63 percentage points – just above SPD/InfoPath at 5.42 percentage points. None of the forums are above 12% now.
  • 6004 new threads have been posted and 4552 threads have been answered for an answer rate of 75.82%
  • 4552 answers in 3 months equals 53.4% of the total answers given EVER in the 2010 forums and amounts to 114.7% of all answered threads prior to the formation of the Task Force
  • Task Force members contributed 3420 posts and 1331 answers (38.9% answer ratio). This accounts for 29.2% of all answers during this timeframe
  • Despite 6004 new threads being posted, the total # of threads with no replies has only gone up by 230 (3.8%)
  • Answer rates for all SP2010 forums are above 72% during this span with Visual Studio leading the way at 81.4% followed by SPD/InfoPath at 78.8%

Due to lack of participation, the Task Force member list was pared down considerably. Anyone with less than 10 posts over the last 3 months was removed, though their contributions are appreciated. It is just very time-consuming to track so many people, so I’ve narrowed it down to so, since some are on the bubble, and I’d like to see continuous contributions.

We still have a long way to go, so let’s keep it up. I hope those who signed up and haven’t started yet are ready to get cranking, and I hope we get more all-stars to join – many are already doing it on their own, so I hope they decide to join the list. Keep rockin!

Ok, folks, the SharePoint forums at MSDN/TechNet seriously need our help. We have an amazing community that gives and gives through user groups, SharePoint Saturday events, major conferences, tons of blogs, tons of books, articles, newsletters, etc., but we have an incredible resource right in front of us that needs a lot more attention. Microsoft provides a set of forums for the entire world to benefit from, and there is an entire area devoted just to SharePoint. There is a pre-2010 SharePoint forum with 17 sub-forums, and there is a 2010 SharePoint forum with 4 sub-forums. These areas provide immeasurable amounts of valuable information to people worldwide who need to either learn about SharePoint or get a question answered. Unfortunately, though, our answer rate in the SharePoint forums pales in comparison to almost every other product category. We have thousands upon thousands of questions that have gone without a single reply and many thousands more without correct answers. The product team and the moderator team do their best to keep pace, but they can’t do it without us. We, the community leaders, community givers, and MVPs are the real people who drive this train, but there aren’t currently enough of us.

That’s why this is a call to arms. I know that not everyone can spend every day on the forums answering questions, but if all of us band together to give a little more effort than we have in the past, then it will make a huge difference. We have the 3rd-largest MVP community, but we have one of the worst answer ratios. I’m ready to change that, but I need help. I need help from people who are already recognized experts – do you realize how exciting it is for a new person to see their question get answered by a 5-time MVP who also authored the book in their cabinet? I need help from people who don’t even realize they can help – if you do SharePoint for a living and are the expert to your client, then I guarantee you have knowledge to share that someone else doesn’t yet have. I need help from people who spend tons of time contributing to the community in other ways but haven’t considered the forums to be a valuable place to spend time – I’m telling you that this is very important, and it will be very rewarding to you and the people you help.

Now, here is the empirical data – just showing the 2010 forums for now – and here is our Task Force! We have a nice mix of wily veterans, occasional dabblers, and noobs. J

 

  

8/15/10

11/7/10

Name

Points

Posts

Answers

%

Points

Posts

Answers

%

Steve Curran

17901

2741

1119

40.8%

1790

237

116

48.9%

Corey Roth

3769

692

220

31.8%

1427

214

94

43.9%

Dave Hunter

17307

2817

1051

37.3%

1404

190

87

45.8%

Alpesh Nakar

3836

915

174

19.0%

989

166

61

36.7%

Spence Harbar

651

95

39

41.1%

950

170

55

32.4%

John Ross

8553

1802

430

23.9%

920

122

56

45.9%

John Ferringer

5412

686

363

52.9%

743

71

54

76.1%

Wictor Wilén

2904

461

179

38.8%

556

69

39

56.5%

Todd Wilder

897

203

40

19.7%

507

74

31

41.9%

Roland White

0

0

0

0.0%

499

97

26

26.8%

Randy Drisgill

3627

660

217

32.9%

389

45

26

57.8%

Chakkaradeep Chandran

3715

838

187

22.3%

386

55

24

43.6%

Sean Wallbridge

12

6

0

0.0%

250

26

18

69.2%

Rob Wilson

248

50

13

26.0%

250

32

19

59.4%

Brian Merrifield

8

6

0

0.0%

249

41

14

34.1%

Moonis Tahir

7729

1302

510

39.2%

223

27

17

63.0%

Eli Van Eenwyk

1710

307

102

33.2%

168

24

10

41.7%

Wes Preston

474

84

26

31.0%

163

19

12

63.2%

Nigel Price

83

95

5

5.3%

146

41

6

14.6%

Rajesh Sitaraman

3394

595

196

32.9%

124

12

10

83.3%

Brian T. Jackett

7

1

0

0.0%

118

24

7

29.2%

Frode Aarebrot

697

123

45

36.6%

88

11

7

63.6%

Johnny Tordgeman

8

33

1

3.0%

81

18

4

22.2%

Chris Schwab

538

80

30

37.5%

79

13

4

30.8%

Shannon Bray

5701

951

350

36.8%

70

20

3

15.0%

Clayton Cobb

27150

5500

1419

25.8%

9087

1602

531

33.1%

         

21656

3420

1331

38.9%

 

Forum

Status

8/15/10

8/15/10

11/7/10

11/7/10

11/7/10

11/7/10

General

  

  

  

  

  

  

  

  

Threads

3529

  

5785

  

2256

  

  

Unanswered

2004

  

2523

  

519

  

  

Answered

1464

42.21%

3165

55.64%

1701

76.62%

  

No Replies

481

13.87%

601

10.57%

120

5.41%

Setup / Admin

  

  

  

  

  

  

  

  

Threads

2833

  

4427

  

1594

  

  

Unanswered

1668

  

2100

  

432

  

  

Answered

1130

40.39%

2267

51.91%

1137

72.47%

  

No Replies

418

14.94%

479

10.97%

61

3.89%

SPD / InfoPath

  

  

  

  

  

  

  

  

Threads

1259

  

2245

  

986

  

  

Unanswered

709

  

919

  

210

  

  

Answered

543

43.37%

1323

59.01%

780

78.79%

  

No Replies

184

14.70%

208

9.28%

24

2.42%

Dev

  

  

  

  

  

  

  

  

Threads

1873

  

3041

  

1168

  

  

Unanswered

1027

  

1240

  

213

  

  

Answered

832

44.76%

1766

58.75%

934

81.43%

  

No Replies

315

16.94%

340

11.31%

25

2.18%

       

Diff Answers

4552

53.4%

       

Diff No Replies

230

3.8%

 

SharePoint 2010 just recently released, so there are tons of questions flooding in, but there aren’t many people answering yet. Yes, I know that it’s new, so not as many people know it yet, but I also know that there are many of you out there working with 2010 as much as possible, so I bet you know the answer to a lot of these questions. The goal is two-fold:

  • Decrease the “No Replies” to under 10% in each sub-forum
  • Increase the Answer ratios to 60% in each sub-forum

Both goals are easily attainable. We can start by going back through all threads with no replies by going to the individual sub-forum and clicking the No Replies filter at the top. Go through ALL of these to find ones you can answer, but don’t just reply for the sake of replying. Please provide valuable information or ask questions to further clarify the question in case it wasn’t clear. This will help us knock down the non-replied threads in a hurry. I will update the numbers every 2 months to show how we’re progressing. The 2nd goal is not quite as easy, but it’s still very doable. To get this number up, it requires that we truly spend time providing or FINDING the right answer. There are many times where I don’t know the answer off-hand, but I’m able to go into one of my environments to test and verify, then I give an answer. For InfoPath questions, I luckily have access to the product team for getting tough questions answered, but I know some of you have great connections with the SharePoint product team and/or with other extremely knowledgeable people who can help get these questions answered more effectively. Your help is of vital importance…

 

So, what do we do? I need volunteers. Either send me a DM to @Warrtalon, or if I’m not following you yet, send a Tweet to the #SPTF hashtag that mentions me and your desire to join up. I will follow you to get your info and add you to the list. You can also click on my Contact page to email me directly. As people join, I will take a snapshot of their forum participation to date so that I can do cross-checks later. However, this is not about individual goals or thresholds. This is about the forum itself and us working as a team to make it better. It’s up to us to make this happen…

 

Thank you all!

Clayton Cobb

SharePoint Architect & InfoPath MVP

Posted in InfoPath 2007, InfoPath 2010, MOSS 2007, SharePoint 2010, SPD 2007, SPD 2010, Workflow, Workflow | 19 Comments »