Heartland Region SharePoint 2013 Conference – Upgrading to SharePoint 2013

Leave a comment

I want to thank all who attended my Upgrade to SharePoint 2013 session at the Microsoft Heartland Region SharePoint Conference 2013 on March 21st.

My slides are in the iFrame below and posted at slideshare.net

Thank you!

Advertisements

Auto Populate User Information in InfoPath with Claims Based Authentication in SharePoint – Part 3 of 3

62 Comments

Auto Populate User Information in InfoPath with Claims Based Authentication – Part 1 of 3

Auto Populate User Information in InfoPath with Claims Based Authentication – Part 2 of 3

I left off part 2 post with completing the remaining rules on the InfoPath form.  Next I’ll need to create a data connection.

If your site does not have a Data Connection Library, be sure to create one before continuing to the next step.

1. In the Fields pane, click Manage Data Connections…

CreateDataConnection

2. Select GetUserProfileByName, then click Convert to Connection File…

3. In the Convert Data Connection window, type the URL, Data Connection Library, and the name of your connection file, then click OK

ConvertDataConnection

4. After the data connection is converted and stored in the Data Connection Library, click Close to close the Data Connections window

Even though I have a data connection library, I still need to do a few things to make the form work with Claims Based Authentication.

First I’ll need to create a Secure Store Connection for InfoPath to use.

5. From Central Administration, select Manage service applications, and select Secure Store Service

6. Select New from the Ribbon

7. I used the following information to create my new Secure Store Target Application

a. Target Application ID:                    InfoPathWebService

b. Display Name:                                InfoPath Web Service

c. Contact E-mail:                              SharePointAdmin@vee.local

d. Target Application Type:               Group

8. Then click Next

9. In the following window, click Next

10. In Target Application Administrators, grant Farm Administrator account to manage Secure Store

11. In  Members, (not sure if I needed to limit this or not) but I added everyone, click OK

12. After the Target Application ID is created, select the dropdown next to the Application ID name, and select Set Credentials

13. Under the Value section, type the following information, then click OK

a. Windows User Name:                    VEE\SPService

b. Windows Password:                       <password>

c. Confirm Windows Password:        <password>

14. From Central Administration, select General Application Settings, then select Configure InfoPath Forms Services

15. Select Allow user form templates to use authentication information contained in data connection files, then click OK

16. Navigate back to the Data Connection Library

17. Download MyResources.udcx data connection file to my local drive

18. Open MyResources.udcx using Notepad

19. Modify Line 24 (approximately) from

<!–udc:Authentication><udc:SSO AppId=”CredentialType=” /></udc:Authentication–>

to

<udc:Authentication><udc:SSO AppId=’InfoPathWebService’ CredentialType=’NTLM’ /></udc:Authentication>

20. Save the file and close Notepad

21. Upload the newly modified connection file to the Data Connection Library

22. Back to InfoPath

Let’s publish the InfoPath form and access it via a Web browser.

No errors.  The form loads with all user information.

PublishedForm

I know it’s a long process, but I hope this helps anyone who have tried to make this work with Claims Based.

Learn more about Centric’s Portals and Collaboration Practice

Auto Populate User Information in InfoPath with Claims Based Authentication in SharePoint – Part 2 of 3

2 Comments

Auto Populate User Information in InfoPath with Claims Based Authentication – Part 1 of 3

I left part 1 of this 3 part series off with me getting an error (Log ID: 5566) when the form is published and accessed via a browser.

Part 2 of this series, I’ll go over how to resolve this error in InfoPath.

This post has step by step instructions.  Fair warning!!, this is a long one.

Let’s go back to designing InfoPath form.

1. In the Rules window, under Run these actions, click Add, and select Set a field’s value

2. In the Rule Details window, in the Field section, select the FieldSelectorIcon icon

3. Verify that Main is selected, and expand dataFields until you see strCurrentUser

4. Select strCurrentUser, and click OK

SelectstrCurrentUser

5. In the Rule Details window, in the Value section, select the FormulaIcon icon

6. In the Insert Formula window, click Insert Function… (This will open the Insert Function window)

7. In the Categories pane, select User

8. In the Functions pane, select userName, click OK

SelectuserName

9. The Insert Formula now has userName() listed, click OK

userName

10. The Rule Details window now has userName() as the value assigned to strCurrentUser, click OK

RuleDetailsUserName

11. In the Rules window, under Run these actions, click Add, and select Set a field’s value

12. In the Rule Details window, in the Field section, select the FieldSelectorIcon icon

13. Verify that Main is selected, and expand dataFields until you see Account ID

14. Select Account ID, and click OK

SelectAccountID

15. In the Rule Details window, in the Value section, select the FormulaIcon icon

16. In the Insert Formula window, click Insert Field or Group… (This will open the Select a Field or Group window)

17. In the Select a Field or Group window, verify that Main is selected

18. Expand the dataFields until you see strCurrentUser

19. Select strCurrentUser, and click OK

20. The Insert Formula window now has strCurrentUser listed, click OK

21. Click OK to close the Rule Details window

This is where assignment of strCurrentUser to AccountName takes place.

22. In the Rules window, under Run these actions, click Add, and select Set a field’s value

23. In the Rule Details window, in the Field section, select the FieldSelectorIcon icon

24. Change Fields from Main to GetUserProfileByName (Secondary), and expand queryFields until you see AccountName

25. Select AccountName, and click OK

SelectAccountName

26. In the Rule Details window, in the Value section, select the FormulaIcon icon

27. In the Insert Formula window, click Insert Field or Group… (This will open the Select a Field or Group window)

28. In the Select a Field or Group window, verify that Main is selected

29. Expand the dataFields until you see strCurrentUser

30. Select strCurrentUser, and click OK

31. The Insert Formula window now has strCurrentUser listed, click OK

32. Click OK to close the Rule Details window

RuleDetailsAccountName2

The confusing part is over, now I just need to populate the remaining fields.

33. In the Rules window, under Run these actions, click Add, and select Set a field’s value

34. In the Rule Details window, in the Field section, select the  FieldSelectorIcon icon

35. Verify that Main is selected, and expand dataFields until you see E-mail

36. Select E-mail, and click OK

37. In the Rule Details window, in the Value section, select the FormulaIcon  icon

38. In the Insert Formula window, click Insert Field or Group… (This will open the Select a Field or Group window)

39. In the Select a Field or Group window, change Main to GetUserProfileByName (Secondary)

40. Expand the dataFields until you see Value

41. Select Value, and click Filter Data

SelectValueAndFilterData

42. In the Filter Data window, click Add (This will bring up the Specify Filter Conditions window.)

43. In the Specify Filter Conditions window, change Value to Select a Field or Group…

44. In the Select a Field or Group window, select Name, and click OK

SelectName

45. In the Specify Filter Conditions window, change the last drop down to Type text…

46. Type WorkEmail, and click OK (This will return you back to the Filter Data window

FilterConditionsWorkEmail

47. The Filter Data window now has WorkEmail configured, click OK

48. Close the Select a Field or Group window by clicking OK

49. Close the Insert Formula window by clicking OK

50. Close the Rule Details window by clicking OK

RuleDetailsWorkEmail

51. Repeat steps 33 through 50 for the remaining fields

a. First Name = FirstName

b. Full Name = PreferredName

c. Manager = Manager

52. Let’s test our settings by previewing InfoPath form.

FormPreview2

Everything looks good at this point.  I’m still not ready to publish the form just yet.  I’ve been impatient in my testing and tried to see my progress.  Of course, after I published and tried to access via a Web browser, the dreaded error 5566 still has not gone away.  So, be patient.  We’re almost there.

Here are the rules I have on my form.

AllRuleActions

There are more steps to complete this, but this post is long enough as it is.  Let’s finish it up on Part 3 of this series.

Auto Populate User Information in InfoPath with Claims Based Authentication – Part 3 of 3

Learn more about Centric’s Portals and Collaboration Practice

Auto Populate User Information in InfoPath with Claims Based Authentication in SharePoint – Part 1 of 3

9 Comments

I need to automatically populate user’s information on an InfoPath form.  This is not as simple when the Web Application is configured using Claims Based Authentication as in SharePoint 2010 or 2013.  I blogged this topic before on a different forum, but I thought I did not include enough explanation on how to resolve the issue.  So, this time I will include step-by-step instructions.

Let’s get started.

1. Create a SharePoint List, I called mine ‘Resources’, with the following columns:

  • Account ID          Text
  • First Name          Text
  • Last Name           Text
  • Full Name            Text
  • E-mail                  Text
  • Manager              Text
  • strCurrentUser   Text (This is my “placeholder” field.)

2. Navigate back to the Resources list, click the List tab, and click Customize Form from the Ribbon.

The following screenshot shows the OOTB List Form.  I’ll modify this a little.

StandardListForm

The following screenshot shows minor modifications made to the form.

StandardListForm-Modified

3. From InfoPath, click the DATA tab, then click From SOAP Web Service under From Web Service

FromSOAPWebService

4. In Data Connection Wizard, type:

http://<Your Web App>/_vti_bin/UserProfileService.asmx, then click Next

5. Select GetUserProfileByName from the operation list, then click Next

GetUserProfileByName

6. In the Parameters screen, click Next

Parameters

7. Click Next on the next screen

StoreCopyInFormTemplate

8. Use the default GetUserProfileByName under Enter a name for this data connection

9. Check the Automatically retrieve data when form is opened, then click Finish

SaveDataConnection2

10. In InfoPath Design, under Fields, select Show advanced view

InfoPathAdvancedFields

11. Click DATA tab, click Form Load from the Ribbon to display Rules window

InfoPathFormLoad

12. In Rules window, click New and select Action

13. Under Details for, type: Get Current User Information

14. Under Condition, click None – Rule runs when form is opened. This will open the Condition Window.

GetCurrentUserInformationRule

15. Change myFields to Select a field or group… (This will open the Select a Field or Group window.)

16. In the Select a Field or Group window, change the Data source to GetUserProfileByName (Secondary)

17. Expand queryFields until AccountName appears, select AccountName, and click OK

SelectAccountName

18. In the Condition window, change is equal to to is blank, click OK

AccountNameIsBlank

I now need to make the Web service call to the User Profile Service to get user information.

19. In the Rules window, under Run these actions, click Add, and select Query for data

20. Verify that GetUserProfileByName is selected, click OK

QueryForData

21. In the Rules window, under Run these actions, click Add, and select Set a field’s value

22. In the Rule Details window, in the Field section, select the FieldSelectorIcon   icon

23. In the Select a Field or Group window, verify that Main is selected

24. Expand the dataFields until you see Last Name

25. Select Last Name and click OK

SelectLastName

26. In the Rule Details window, in the Value section, select the FormulaIcon  icon

27. In the Insert Formula window, click Insert Field or Group… (This will open the Select a Field or Group window)

28. In the Select a Field or Group window, change the Fields value from Main to GetUserProfileByName (Secondary)

29. Expand the dataFields until you see Value

30. Select Value, and click Filter Data…

SelectValueAndFilterData

31. In the Filter Data window, click Add (This will bring up the Specify Filter Conditions window.)

32. In the Specify Filter Conditions window, change Value to Select a Field or Group…

SelectCondition

33. In the Select a Field or Group window, select Name, and click OK

SelectName

34. In the Specify Filter Conditions window, change the last drop down to Type text…

35. Type LastName, and click OK (This will return you back to the Filter Data window

FilterDataLastName

36. The Filter Data window, now has the LastName information, click OK

FilterDataLastName2

37. Click OK to close Select a Field or Group window

38. Click OK to close Insert Formula window

39. The Rule Details window now has LastName in its value field, click OK

RuleDetailsLastName

40. Let’s test the configuration we’ve done so far. Preview the form.

FormPreview3

41. So far so good. Close the form preview window.

42. Publish the form to the SharePoint list (Resources)

43. Open the SharePoint list the browser

You should now be taken back to the SharePoint list in your browser.

44. Click new item

45. A Warning window appears with a message An error occurred querying a data source. Log ID:5566

Error5566

46. After clicking OK the form is loaded without user information.

This error (5566) is expected when making a Web service call in SharePoint configured with Claims Based Authentication.  We will now leverage the “placeholder” field (strCurrentUser) we created earlier.

Go to part 2 of this series

Auto Populate User Information in InfoPath with Claims Based Authentication – Part 2 of 3

Auto Populate User Information in InfoPath with Claims Based Authentication – Part 3 of 3

Learn more about Centric’s Portals and Collaboration Practice

Content Search Web Part and Event Dates in SharePoint 2013

20 Comments

I’m working on a project with Mike McNett where we have multiple calendars across multiple sites in a site collection.  We need to create a single view where upcoming events can be viewed from one central location.

We started with Content Search Web Part (CSWP) since it can retrieve all calendar events.

So here’s the path we took:

1. Added Content Search Web Part to a page

2. Changed Query from “Recently changed items (System)” to “Items matching a content type (System)”

3. Changed Restrict by app from “Current site” to “Current site collection”

4. Changed Restrict by tag from “Do not restrict on content type” to “Event”

CSWP - BaiscQuery

5. Switched to Advanced Mode

Note: You can change the path the Query text to include all site collections by removing <sitecollection> from the URL.  If you want to include all lists in your farm, remove the path value all together.

ContentTypeId:0x0102* indicates “Event” we selected earlier.

6. Clicked Test Query

In the SEARCH RESULT PREVIEW, all events returned. In our case, 10 results (This includes past, present, and future dates)

CSWP - QueryText1

So far so good.

Since we only wanted future events to return, we started adding a filter.

7. Changed Property filter to:

StartDate>={Today}

In the SEARCH RESULT PREVIEW, Results=0. (There are five (5) events that meet this criteria.)

CSWP - QueryText2

We tried different properties, including EndDate, and everything with the word “Date”, still the SEARCH RESULT PREVIEW, returned 0 or a syntax error.  We checked to make sure that content has been indexed.

Note: Comparing anything with OWSDATE to {Today} gave us a syntax error. (I’ll explain why later.)

Below is the screenshot when comparing AnythingOWSDATE to {Today}.

CSWP - SyntaxError

After a lot of head-scratching, we started looking into Search Schema. (This can be done at a site collection or a farm level.)

In the Managed property, we typed “date” (without the double quotes).  Here’s where we saw OWSDATE is a “Text” type.

A light bulb went off, this is why comparing {Today} to AnythingOWSDATE caused the Syntax error I mentioned earlier. (At least this made sense to me.)

ManagedProperty

8. So we edited the Date00 Property to the following:

8.a Queryable: checked, Retrievable: checked, Refinable: Yes – active, Sortable: Yes – active;

And affter many tries, these are the settings we used:

8.b Mappings to crawled properties:

Include content from the first crawled property that is not empty, based on the specified order

Ows_EventDate

Ows_q_DATE_EventDate

MappingProperties

9. Started a Full Crawl

10. Went back to the CSWP, and added Date00>={Today}….drum rolls….

It worked!!!

The SEARCH RESULT PREVIEW showed five (5) events.

CSWP - QueryText3

We went back and modified the CSWP properties to include the desired settings, and here’s the final result.

CSWP - Results

We hope this helps those who have similar requirements.

Heartland Region SharePoint 2013 Conference – Exploring SharePoint 2013

Leave a comment

I want to thank all who attended my Exploring SharePoint 2013 from an IT Pro Perspective session at the Microsoft Heartland Region SharePoint Conference 2013 on March 21st.

As promised during the session that I would post my presentation on my blog, the presentation is included here and also at slideshare.net.

Thank you again!!