Simple Corporate Directory with InfoPath 2007, SharePoint 2007 and Web Service

by michaellotter 7/7/2007 11:14:00 PM

Currently have a client that we built a SharePoint 2007 web part that displays Active Directory user name, company, title and extension and it's filtered by location and last name initials.  All the LDAP queries were built in a .NET Class project and exposed through a .NET Web Service.  This was all great but I wanted a simple way to display the data in a table format during testing so I decided to use InfoPath 2007 as the presentation layer.  To get it to work was simply done by created a Data Connection to my web service and then inserting the repeating group from web service data source to the form as a repeating table.  Then I clicked the preview button and all Active Directory user information was returned after a short period of time.

The web service was built to accept three parameters (company name, last name initial and title) and I wanted to add the capability to the form to submit the parameters dynamically to test performance of the LDAP query.  To accomplish this I added three textboxes and a button to the form and then created a rule for the button to set the web service data source parameters with the corresponding textboxes and then execute a query to retrieve the results whenever the button was pressed.  All this was accomplished within in minutes and that started me to think about what else could be done simply.

Before I could think about it, my patient, understanding lovely wife came into the office and said she was ready for dinner, so off we went.  Driving to dinner it came to me that I could just publish the form to SharePoint 2007 and display it through the XMLFormView web part so it can inherit the look and feel of SharePoint site.  After returning from dinner this was accomplished by converting my data connection and publishing it the Site Collection Data Connection Library, tiding up the form and publishing it to my local drive.  Then I opened up Central Administration and uploaded the form to InfoPath Form Services and then activated it to my site collection.  I opened my site and created a new page and added the XMLFormView web part and specified the location of the form and published the page. 

The form worked great when returning small amounts of user information but had troubles handling large amounts of user information.  This brought me to the ideal of doing some sort of paging but when I went back to InfoPath I was unable to figure it out and I decided to postpone the research for another night but wanted to share the above ideal with everyone.  If anyone has any ideal on how to make the paging work I would love to hear about it.

Cheers,
Michael

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Related posts

Comments

7/8/2007 3:13:57 PM


Look into the Data Form web part from SharePoint Designer's Data View menu.
Just add your web service to the Data Source Library and then add it to a web part page. You will get sorting paging, sorting and filtering out of the box.



Ian Morrish

7/9/2007 6:51:37 AM

http://

Another way it can be done with the Data Form Web Part is to create a Linked Server in SQL Server to connect to AD via ADSI. You can then query AD via a SELECT statement through the Linked Server. Then no web service is needed.

http://

7/9/2007 12:27:39 PM

http://

I'd love to get my hands on that web part! Smile

http://

7/12/2007 6:01:43 AM

http://


Hi Ian and Joe,

I never thought about using SharePoint Designer for the directory web part and I think its a great ideal but for most of my clients would never go for the ideal because its SharePoint Designer. I guess SharePoint Designer has gotten a bad wrap from the Frontpage days and all the unghosted page ordeal.

Thank you for the comments.

Cheers,
Michael


http://

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

11/20/2008 1:59:47 PM

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Recent comments

Tags

Don't show

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in