Clayton's SharePoint Madness

All About SharePoint, InfoPath, and SharePoint Designer!

Archive for the ‘MOSS 2007’ Category

Things related specifically to Microsoft Office SharePoint Server 2007

Speaking at the Document Strategy Forum Conference in Chicago on Nov. 1st

Posted by Clayton Cobb on September 19, 2011


Please join me at the DOCUMENT Strategy Forum – Chicago on Nov. 1st while I give a full-day presentation on InfoPath that includes all the basic, foundational elements of InfoPath and then progresses into integration with SharePoint. It will start out very basic and will progress through the day to intermediate level before finishing up with some live examples of real solutions that utilize the techniques explained and shown. The presentation is fun and full of “hotness” as you will find when you attend. =)

My session: PC500 Solving Business Problems using SharePoint and InfoPath | Tuesday, Nov. 1st from 10:00am – 5:00pm


If enough people sign up, maybe I’ll give away an Xbox 360 w/Kinect? Sound good to anyone? If you plan to be there, please sign up at the conference and give me a shout out here on the blog with a comment!


BFMA is looking forward to our third year partnering with the DOCUMENT Strategy Forum! DOCUMENT Strategy Forum, November 1-3 at the Crowne Plaza Chicago O’Hare.


Take Your Transactional Document Performance Up, Up & Away…
Attend One of Five Exclusive Pre-Conference Workshops!
Sometimes forty-five minutes just isn’t enough time to truly cover a specific topic! That’s why, DOCUMENT Strategy Forum created a series of intensive, in-depth, all-day pre-conference workshops to cover the material that is important to you. The workshops being offered focus on five different segments of the document life cycle including; SharePoint Implementation & Certification, Managed print Service (MPS), Mailpiece Design Certification, Adobe LiveCycle Designer and Utilizing InfoPath. You will gain great knowledge from your workshop leader, but even better is the interactivity you will have with your peers… learning from each others’ achievements and challenges.

Download our 2011 Conference Brochure Click Here!


Intensive Pre-Conference Workshop Series
Tuesday, November 1st • 10am – 5pm *Lunch included

AIIM’s SharePoint Practitioner Certificate Program
SharePoint has become one of Microsoft’s fastest selling products of all time and one of the most recognizable names in the technology sector, but what is it really? What does it really do? How can organizations harness its true potential? A successful implementation of SharePoint requires so much more than simply purchasing this solution. Enterprises must approach such initiatives with a sound strategy and structure for how to share and manage information across the organization. This special, full-day workshop, offered by the AIIM Certificate Program, introduces enterprise strategies and technologies for managing content using SharePoint, primarily focusing on 2010 capabilities while touching on 2007 or earlier capabilities as needed, and addresses information governance, integration techniques and migration. Attendees will have access to the online materials and exam to gain the official AIIM designation of SharePoint Practitioner. The designation is valid for 5 ye ars.

Achieving Sustainable Cost Benefits of Managed Print Services: Strategy & Best Practices
Cost reduction has always been a top concern for any enterprise’s bottom line, much more so now as organizations are still feeling the harsh lessons of the recent recession. With this focus on cost, along with evolving demographics and emerging technologies, it is no surprise that we have seen the rise of managed print services (MPS). Today, many executives are looking to get a handle on their printing costs and identifying potential cost-saving opportunities. To fully realize the benefits of a managed print program, organizations will need to understand how to effectively manage the full document life cycle — from its point of origin to its return to electronic format. This special, full-day workshop offers MPS concepts, strategic adoption of print programs and best practices to achieve the best cost benefits.

Mailpiece Design Consultant (MDC) Certification Program
We are pleased to present you with the opportunity to become a Mailpiece Design Consultant (MDC) through the Mail Systems Management Association’s (MSMA) Certification Program. Why get certified? Your company needs to have a point person within your organization — someone who has the ability to evaluate the cost of the mailing of a newly designed document. By becoming certified, you will demonstrate that you have gained a greater understanding of the USPS requirements, as they relate to mailpiece design, and the preparation of discounted mailings. The certification also demonstrates that you have an enhanced capacity to analyze discount payment options for mailing applications. The certification is designed for anyone responsible for the design, printing or mailing of any document. The MDC certification confirms that you have met the requirements as established by the mailing industry’s leading certification entity — MSMA. Prior to the exam, you will be given the necessary study materials. But even better, we start the day with a two-hour refresher course, which provides a high-level overview of mailpiece design requirements, classes of mail, extra services and commercial mail preparation as well as a 25-question pre-test. In the afternoon, you will take the exam, which is comprised of true/false and multiple choice questions. As an “open book” exam, you may use the MDC Study Guide and/or any other postal publications. You will have four hours to complete the exam. Successful completion is a score of 90% or better. Those receiving certifications will be honored at the Forum. Sign up early to get your study materials in advance of the Forum.

Designing Forms with Adobe® LiveCycle® Designer
In this special, full-day workshop, attendees will review the basic tools of Designer, exploring the form components in the standard library as well as create their own in the custom library, and learn design tips and tricks while avoiding common design problems. Discussion around how static form design compares to dynamic form design will be included as well as tab order, importing from Word or existing PDF files, action builder, alignment and layout techniques, tables, basic math calculations with scripting, master pages and multiple-page layouts. This tutorial will also discuss techniques to add intelligence to the form and to create dynamic layouts that react to the data or to user interactions.

Solving Business Problems Using SharePoint and InfoPath
Although InfoPath has been a part of Microsoft 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. This special workshop will offer attendees a sneak peek into the latest versions of SharePoint and Microsoft Office, walk through the latest features of InfoPath and discuss how these tools are helping organizations improve their processes.

INDUSTRY FIRST CONFERENCE TRAVEL REBATE PROGRAM!
Register for the Platinum Conference Package and Receive One Free Hotel Night (a $200 value)! DOCUMENT Strategy Forum is once again pleased to offer its award-winning Conference Travel Rebate Program. We believe so strongly in the value of you attending that we’ll help cover some of your travel costs. Simply register to attend our Platinum Conference Package and you are automatically eligible to receive “One Free Night” at the Crown Plaza Hotel.

See www.documentstrategyforum.com/rebate.html for details.

Advertisements

Posted in MOSS 2007 | 2 Comments »

2010 in review

Posted by Clayton Cobb on January 2, 2011


The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 90,000 times in 2010. If it were an exhibit at The Louvre Museum, it would take 4 days for that many people to see it.

In 2010, there was 1 new post, growing the total archive of this blog to 15 posts. There were 4 pictures uploaded, taking up a total of 200kb.

The busiest day of the year was August 17th with 543 views. The most popular post that day was MSDN Forums SharePoint Task Force – A Call to Arms!.

Where did they come from?

The top referring sites in 2010 were social.msdn.microsoft.com, infopathdev.com, social.technet.microsoft.com, blogs.microsoft.co.il, and google.com.

Some visitors came searching, mostly for infopath 2010, getuserprofilebyname, clayton cobb, sharepoint 2010 update, and sharepoint 2010 updates.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

MSDN Forums SharePoint Task Force – A Call to Arms! August 2010
18 comments and 3 Likes on WordPress.com

2

InfoPath – Get user information without writing code (extended) June 2009
201 comments

3

Blog Listing July 2009
139 comments

4

InfoPath – User Roles in Browser-Enabled Forms Using AD Groups July 2009
124 comments

5

Auto-Numbering InfoPath Forms June 2009
85 comments

Posted in MOSS 2007 | Leave a Comment »

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 »

InfoPath – User Roles in Browser-Enabled Forms Using AD Groups

Posted by Clayton Cobb on July 19, 2009


MAJOR REVISION – Now using GetCommonMemberships web method to determine group memberships for users without needing to use contact lists or any other manual data source!

So, you need to restrict certain controls in your InfoPath form, but it’s browser-enabled, and you just found out that User Roles are not supported, huh?  You also see that SharePoint permissions do not help restrict specific areas within your form, so what do you do?  There are probably several methods, but here is the one I have come up with that uses all built-in functions of InfoPath and MOSS 2007 without any code and leverages Active Directory Security Groups.

Special thanks to a co-worker of mine – Irene Clark – who I taught to use the UserProfileService and subsequently figured out on her own that GetCommonMemberships could help with User Roles.  She showed it to me, and I immediately jumped on it to come up with what you see here.   Thank you very much, Irene!

Here is an outline of the steps with the assumption that you already have a working, browser-enabled form.  If anyone needs me to write up the basic steps of doing creating a browser-enabled form from scratch, let me know via the Blog Request Log:

  1. Add GetCommonMemberships data connection
  2. Add necessary fields to form template and configure them
  3. Add conditional formatting to applicable controls

User Profile Service – GetCommonMemberships Method

We must add this superb web service to our form template as a data connection.  Please use the first 8 steps of Itay’s writeup to get this done as I can only give him credit for my extensive knowledge of this web service.  Once you’ve added it successfully, we need to do a few things with it using the later steps in Itay’s blog.  Here are the steps.  They are only text with no screens, so I will just paste them here.  Remember that we are leveraging a different web method than Itay, but it’s the same web service:

  • With InfoPath opened go to Tools > Data Connections, and click ‘add…’ to add a new data connection to the form. This opens up the Data Connection Wizard.
  • We want to receive data from the WS about the current user, so choose receive data’ and click next.
  • Our data source is a WS so choose ‘Web Service’ and next.
  • Now you will have to point the wizard to the WS. Type an address similar to this: http://ServerName/_vti_bin/UserProfileService.asmx  and click next.
  • Here you get a list of all methods for that WS, choose GetCommonMemberships and click next.
  • In this screen you can specify what parameters are sent to the method, we are relying on the method’s ability to return the current user name if no value is passed to it, so we will leave this as is (no value is passed to the method) and click next.
  • Click next and make sure ‘Automatically retrieve data when form is opened’ is checked.
  • Finish the wizard.

In this solution, the GetCommonMemberships (GCM) method of the UserProfileService will provide the values we need to check a user’s Active Directory (AD) Security Group (SG) and Distribution List (DL) membership.  This method also provides SharePoint (SP) Site membership, but that is not as useful as if it provided SP group membership, which it does not.  I will be focusing only on the AD group memberships for this write-up.  Here are some steps showing how to use and see what this method provides:

  • View this method’s node structure
  • Drag the whole repeating group to the canvas and preview to see the result
  • Reduce the table to the most useful fields and decide which ones you want to leverage
  • Filter to show only the AD groups
  • Create a dropdown control bound to an element in your main data source that will show a selectable list of groups for a given user
  • Use this information to apply conditional formatting on other controls

Notice that the node structure in the GCM method (Fig 1) is much more friendly than GetUserProfileByName.  You can clearly see the information that is available, and the nodes are self-explanatory for the most part.

URG1

Fig 1 – GCM Node Structure

Grab the MembershipData repeating group onto the canvas and choose Repeating Table when prompted.  This lays out the entire node structure nicely, although you will need to expand the table and the columns in order to clearly see the data (Fig 2).

URG2  

Fig 2 – Full GCM Repeating Table Structure with Sample Data

In my opinion, certain fields are not useful to us due to either not having data or not having data that is useful for determining User Roles.  I will delete the columns named Group Type, Privacy, ID, Member Group ID, and Group (Fig 3).  Notice that Member Group ID does have some unique info, but I am not yet sure how to leverage that data.  You may also want to remove the SourceInternal field from the MemberGroup section, because it shows the same GUID each time (at least in my system).  As for the remaining fields, here are my notes so far:

  • Source: This shows whether or not the record is an AD group (noted as “DistributionList”) – or a SharePoint site membership (noted as “SharePointSite”).  Notice, these are not SharePoint groups, but rather site memberships and only where the user has been specifically added to that site with permissions as opposed to inherting permissions through AD SG membership.  The AD groups include both SGs and DLs, which is important to know.
  • Member Group – Source Reference: This shows the Organizational Unit path in Active Directory of the DistributionLists and shows a GUID for SharePointSites.
  • Display name: This is the Display Name of the group as defined in AD.  In Outlook, this name can typically be used as an addressee for an email, and the name will resolve to the email address.  This name SHOULD be unique and will be what we use for our User Role matching later.  For SharePointSites, this is just the site name.
  • Mail NickName: This is the alias for that group in AD, and it also will resolve to the email address when used in Outlook.  However, I found in my system that there were _two_ separate contacts in the GAL with the same alias.  That should not happen, and I will be notifying the AD admins, but the fact that it did happen with a common SG I use means it is not a guarantee, so be wary of that.  The same could potentially happen for Display Name, but that is a much longer and more specific name while aliases are sometimes just a few letters.  There is no nickname for SharePointSites.
  • URL: This is the direct email address for the group in the form of mailto:name@domain.com.  This also could be a very good source for matching groups and/or for sending emails.  Again, the email address SHOULD be unique, but that all depends on how well your AD is maintained.  For SharePointSites, it shows the URL to the site.

URG3

Fig 3 – Partial GCM Table with Relevant Columns Only

If you ever plan to use this method for displaying a user’s list of group memberships, you may want to only show the DistributionList records.  To do so, simply right click on the repeating table itself and create a conditional formatting rule that hides the control if the Source node is equal to “SharePointSite” in it (Fig 4).  Interestingly, when going through the wizard to set this condition, the wizard automatically detected the available options for that node.  I am used to seeing that with my main data source, but it does not always happen when referencing a secondary data source node.  In this case, it helps to quickly choose the right selection without the potential for a syntax error.  The result will be that you only see DistributionList records in the repeating table, which is the information that would be useful.

URG4

 Fig 4 – Set Filter on GCM Table to Only Show AD groups

You may also at some point wish to show a user’s group memberships in a pulldown and then use a particular selection to trigger a rule or match some other condition elsewhere in the form.  You may even use it to see another user’s memberships (other than the current user) and then select a group to then invoke the UserGroup web service (or possibly other available web services/methods similar to this) to enumerate the users in the group.  That is outside the scope of this write-up, but it’s something to consider.  To set up the dropdown, follow these steps:

  • Create a text data element in your main data source with whatever name you prefer
  • Drag that field to the canvas, which makes a text box
  • Right-click that box and change it to a Drop-down List Box
  • Double-click the dropdown to get to its properties (Fig 5)
    • Select the radio button that says, “Look up values from an external data source
    • For the Data Source, choose GetCommonMemberships
    • For Entries, click the button, drill down through the groups, and select the MembershipData repeating group
    • For Value, choose whatever node you prefer as your primary key (unique value).  DisplayName, Nickname, and URL are all suitable.
    • For Display Name, choose the DisplayName node
  • Click OK until done and preview the form.  You should see the friendly names of your groups all listed in the dropdown.  Since this is a browser form, we cannot filter the dropdown (at least until we get SharePoint 2010!), so you will see the SharePointSites, too. 

    URG5

Fig 5 – Dropdown Bound to Main Data Source and Showing GCM Group Data

Add Necessary Fields to Form Template, Create Layout, and Configure Default Values

First, manually create all the fields and groups you see below (Fig 6).  Notice that strAdmin and strFinance have default values.  Do not mimic these in your real form, because they will depend on your group names, which we’ll get to shortly.

 URG6

Fig 6 – Data Structure

Next, we need to create our layout on the canvas (Fig 7).  For this example, I just simply have two sections that are bound to grpAdmin and grpFinance (do not include their child fields), respectively, along with some text and a color for differentiation.  I also have a repeating table bound to the MembershipData repeating group of the GetCommonMemberships method that is only showing the DisplayName element.  This is only on the form for now to show what is happening, but it would not be on the form when using this concept unless you have some reason for showing the current user’s groups.  You get this on the canvas by following the steps shown in Figures 2-4.

 URG7

Fig 7 – Form Layout

After that, we need to assign our initial values that will play a part in the security of our form.  For this exercise, we will use two Group Check Fields. This part is important, because this is what defines the group memberships in your form that will be leveraged for User Roles.  I am using “Sharepoint Admins” and “Finance,” because those are the _exact_ words that show up in the DisplayName field of GetCommonMemberships (refer to Fig 2).  In your case, you’ll want to add a field for each group that you want to define for your User Roles and set its default value accordingly:

  • strAdmin – Set the default value to the text “Sharepoint Admins” (no function used)
  • strFinance – Set the default value to the text “Finance”
  • Remember, please use proper values for your environment based off what you see in your equivalent of Figure 2 above

Add Conditional Formatting to Sections

  • Administrators Section – We are going to set conditional formatting on this control (Fig 8) so that if the user is not in the Sharepoint Admins security group, then this control will be hidden:
    • Double-click the Administrators section on the canvas to get to its Properties, click the Display tab, then click Conditional Formatting and click Add
    • In the first field, click Select a field or group
      • In the Data Source pulldown, select the GetCommonMemberships secondary data source
      • Drill down the dataFields path until you get to DisplayName, which you should single-click
      • At the bottom of this box where it says Select, choose the phrase All occurrences of DisplayName, then click OK
    • For the Operand, choose are not equal to
    • In the last box, click the pulldown and choose Select a field or group, then choose strAdmin from the main data source
    • Lastly, in the Formatting area, check the box for Hide this control

 URG8

Fig 8 – Conditional formatting to hide sections from unintended users

  • Finance Section – Do the same thing as with the Administrators Section except in the last box of the conditional formatting setup, choose strFinance.  This will compare the current user’s list of group memberships with the exact name of the Finance security group, which is what we set the value of strFinance to be.

Now, it’s time to show it in action.  In my scenario, I have two user accounts:

  • Clayton Cobb – I am in the Sharepoint Admins SG but not in Finance
  • SharePoint Tester – He is in the Finance SG but not in SharePoint Admins

I’ll start with SharePoint Tester being logged in (Fig 9) who will open a new browser form (Fig 10).

 URG9

Fig 9 – SharePoint Tester logged in

 URG10

Fig 10 – SharePoint Tester only sees the Finance section

After saving the file as the SharePoint Tester, I will now log in as myself (Fig 11) and open the existing form (Fig 12). 

 URG11

Fig 11 – Clayton Cobb logged in

URG12 

Fig 12 – My account only sees the Administrators section

**After it is all working, be sure to remove the repeating table from your form, or if you decide to show it for some reason, you may want to make that field read-only so that users can’t manually change it.

That’s all there is to it!  You can now leverage Active Directory distributon lists and security groups for providing a mock User Roles functionality in Browser Forms without writing any code and while maintaining Domain Trust. The key here is that when looking at the same form, two separate users will see different information that is available based on their group memberships in Active Directory.  Imagine the other ways you could leverage this by restricting individual controls, whole sections, or even entire views, which is very powerful!

Posted in InfoPath 2007, MOSS 2007 | Tagged: , , , , , , , , , , , , , | 187 Comments »

Using [ME] to Filter InfoPath Form Views Based on Form Metadata

Posted by Clayton Cobb on June 29, 2009


This is something that I ran into a while ago where I couldn’t seem to promote a field from my form into an existing Person/Group column in my form library.  Even though the data in my field was correct (domain name or email address), I was unable to connect them due to the Publishing Wizard saying the data types don’t match.  This happens even if you use a Contact Selector that has the AccountID attribute – it won’t match.  So, I thought up using SharePoint Designer to pull the data from the promoted field in InfoPath and setting it as the value for an existing Person field.  Doing it this way will only allow domain name (domain\username) and email address, but it works like a charm.  Sure, you have a duplicate column with the same info, but you can just hide the promoted column from InfoPath in your View settings.  Here is an article that someone else already wrote that shows how to do this step-by-step.  I was going to write it, but someone beat me to it.  =)

Create Personal SharePoint Views depending on an InfoPath field using [Me]

One thing to be VERY CAREFUL of is that when you use an SPD workflow to update a field, this is taken as an edit to the record.  So, if your workflow is set to automatically run on edit of a record, then you will cause an infinite loop.  To beat this, you have to put a condition on the Set Field in Current Item action that states “If <InfoPath promoted field> is not equal to <SharePoint Person Field>” or something to that effect and have an Else statement that simply “Stops the Workflow”.  The problem is that the Person field consumes certain data (i.e. domain name) but displays other data depending on how the field is configured – the default is to show Name (with presence), which may cause the conditional statement not to work properly.  You want the condition to stop the workflow if the Person field in SharePoint has already been set with the CURRENT info in the InfoPath promoted field.  You can’t use the statement “If <SharePoint Person Field> is blank,” because the name may get changed in the form after creation.

Posted in InfoPath 2007, MOSS 2007, SPD 2007, Workflow | Tagged: , , , , , , , , | 7 Comments »