| Paul's profilePaul Galvin's SharePoint...BlogListsSkyDrive | Help |
|
April 25 Quick and Simple: Make an InfoPath Form Read Only (InfoPath Forms Services in MOSS)There's a common business scenario like this:
This office.microsoft.com example describes how to create a separate "view" and mark the whole view as read-only. This is a workable approach but has the drawback that you've effectively created two entire versions of the same form and must now keep them in sync manually. If you add a field to the editable view, you must then add it to the non-editable view as well. Over time, with different developers, there can be some divergence. This alternative might work better in some cases:
The drawback to this approach is that all the fields will still be editable on the screen. The user can get a false impression that they can actually change content. You can mitigate that by putting in some text that the form is disabled, possibly in big red letters across the top of the page. In one project, I created a "workflow status" view. As the workflow progressed, it would update specific status fields that had been promoted from the form. When the user opened the form, the "open form" rule automatically switched to that view and the user had a nice little summary status. </end> Technorati Tags: InfoPath 2007, SharePoint Workflow April 23 Use Semaphores in SharePoint Designer Workflow to Prevent Endless LoopsIt's possible to cause an endless loop in a SharePoint Designer workflow. A common implementation pattern like this causes the problem:
To prevent this endless loop, implement a simple semaphore:
This can become a fairly nuanced solution, depending on business requirements and so forth, but it's been a workable pattern when I've needed it. </end> Technorati Tags: SharePoint Workflow April 22 Developers: How Do I Learn SharePoint?UPDATE: 04/25/08: Was catching up on some blog posts and found a link to this article: http://www.networkworld.com/news/2008/032608-microsoft-sharepoint.html?page=1. I make note of it because in addition to asking, "how do I learn sharepoint?", some people ask "why should I learn sharepoint?". That article partly answers the later. In the last several months, a dozen or more folks from across the planet have been emailing me and asking the general question, "How do I learn SharePoint?" I'm hardly authoritative, but I've had some success (and trying to get better all the time) so I thought I'd document my personal road map. Others may find it valuable. Before I do that, I just want to observe that it's obvious to me, based on these personal emails and the even greater number of MSDN / SharePoint University posts of the same nature, that there is huge developer interest in getting up to speed with WSS/MOSS. I wonder what it's going to be like a year from now ... easier to find good SharePoint talent? The same? Are folks committing themselves to the platform at a rate sufficient to keep up with demand for good resources? How could you even figure something like that out short of a WAG? Paul's RoadmapI was full time employed by the good folk at Conchango while I followed this road map. This means that from a learning perspective, I was actively engaged in projects as I followed the steps I outline below. Some Basic TermsFor people entering this world, there are two key acronyms:
WSS is "free" in that it's bundled with windows server 2003 (or at least can be downloaded from MS). I put quotes around free because you need a box, a valid O/S license and probably SQL (though there's a "free" kind of SQL as well). MOSS is built on top of WSS and extends it. There is no MOSS without WSS. MOSS is not free. Perhaps not day one, but soon after you've got some basic familiarity with the platform, it's important to learn the differences. For example, a powerful web part, the Content Query Web Part, is a MOSS feature and not available WSS. People often make the incorrect assumption that CQWP is available in WSS and then end up scrambling for a stop-gap measure when they realize their error. Hit the BooksI started working with WSS/MOSS on about 01/02/2007. I had a little prior experience with SPS 2003 but very little. To get myself started, I purchased the two books listed here (http://paulgalvin.spaces.live.com/lists/cns!1CC1EDB3DAA9B8AA!203/). I started with the big blue administration book. Naturally, it covers administration. At the same time, it provides a survey of all MOSS features (and WSS features as well). For me, it's not so important to remember all the various details (until it's time to get certified) but it's good to know the boundaries. (I follow this same approach in 1st person shooters I play on the xbox or PC -- I enter a room and tend to make a counter-clockwise loop until I get back where I started. I just feel better knowing the shape of the box I'm in.) After reading the big blue book, I would read the entire Inside WSS book. It dives deeply into issues that developers care most about. Create a Virtual EnvironmentIn order to do any development or properly use the environment, you need a full blown windows server operating system with SharePoint Designer, Visual Studio 2005 (2008 works, but some useful tools have yet to be ported as of the writing of this article), InfoPath 2007 and some other stuff. There are many good blog entries describing this process. I'd have a look at these two:
In addition, Andrew Connell shared his experiences with VMWare here: Use your favorite search engine to see what other people do. It's a useful learning exercise in and of itself. Spend a few minutes angrily denouncing the fact that you need a server environment on which to do development. But ... don't bother blogging about it or posting it to MSDN forums. It's already been done :). Instead, embrace it and move on. You'll be better off for it. Get CertifiedI believe that the MS SharePoint certification path, which consists four exams, is exhaustive. I suggest that you follow their online preparation guide and do your best to understand each of the areas of the test. I do not suggest that you take the exam just to pass it. I do not suggest that you use one of the "brain dump" style 3rd party "tools" for passing MS tests. If you can take the test, pass it based on a combination of your own directed study and hands-on experience, you'll be a stronger developer and job candidate for it. There are four tests in two "tracks": Developer:
Admin:
I recommend that developers study for all of these exams. You'll be strong for them, though I suppose if you skipped the admin exams, you would get by. I found the WSS version to be considerably more challenging than the corresponding MOSS versions, much to my surprise. I was in a class recently and several others made the same point. While I was studying for the 70-542 exam (MOSS development) I tracked my study resources. These may be helpful to you as well: http://paulgalvin.spaces.live.com/Blog/cns!1CC1EDB3DAA9B8AA!192.entry Plug Yourself Into the CommunityThe SharePoint community is vibrant, strong and growing larger all the time. You want to look at the following to start:
BlogsIf you don't understand RSS, stop everything and learn it. It will take 10 minutes to learn it, maybe another 10 minutes to find a web based RSS reader (I like google's reader, www.google.com/reader). Start by adding this blog to your RSS reader :) Next, add www.sharepointblogs.com to your reader. They aggregate many blogs into a single feed. Over time, you'll find blogs that are not aggregated that way. Just add them individually. I subscribe to a few dozen blogs which I've accumulate over the last year. If you want, I can export my list and email it. Eventually, you may want to start your own blog. I personally think that a series of blog entries describing a "newbie's" progress learning WSS/MOSS would be an interesting series. I wish I had done that myself. ForumsI actively participate in two forum groups: MSDN and SharePoint University. Forums are excellent places to learn. People ask questions ranging from the very simple ("How do I create a site column") to the panicked ("My server is down!") to more hypothetical design questions. Once you get a flavor of the environment, venture out and start replying. Short of directly interacting with a customer, nothing is better than this for hands on experience. CodeplexGo to www.codeplex.com. Check it out and search for SharePoint projects. Subscribe to the daily summary Codeplex feed in your feed reader. Add any new SharePoint projects to your feed reader. Eventually, after reading the forums and facing down your own WSS/MOSS demons, consider putting together your own codeplex project. As I write this blog entry, a lot of SharePoint folk have started using Twitter. It's hard to characterize Twitter. You'll just have to check it out yourself. ConclusionThat wraps up my roadmap and makes me current. I just started using Twitter two weeks ago. WSS/MOSS is a very cool platform and the community is growing all the time. Use community resources to improve your skills and enjoy the journey! </end>
Technorati Tags: SharePoint, Learning SharePoint April 17 Data Protection Manager: Seems Like a Great SharePoint Backup/Restore SolutionAt the New Jersey SharePoint User Group meeting last night, Microsoft Sr. product specialist DuWayne Harrison presented Microsoft Data Protection Manager 2007. DuWayne was great (and he was supported by one or two colleagues from the audience whose names I don't recall). You can get the presentation materials here. Up until last night, I have never heard of DPM. I'm not a system admin type person, so I'm writing this from SharePoint consultant's perspective and may get some of the words wrong. To me, DPM is a backup/restore solution for Microsoft "stuff":
Beyond that stuff, which I would consider to be minimal requirements for any kind of "real" backup/restore product, DPM also has built-in intelligence for SharePoint. It understands about server farms and lets you restore:
The actual restore process involves extracting the target data from the backup and save it into a "restore farm" and then from there, moving it to the production environment (or wherever you want to restore). I think this is seamless, but there was a lot of emphasis on the need for a "restore farm". The restore farm does not need to match the production environment in every particular (mainly in physical topology) but does need to match in terms of templates, versions, etc. I didn't see a full end to end demo, but DuWayne did show screen shots and some live demos. It seems to be as good as it needs to be, at least for a moderate sized environment. I was particularly struck by the pricing. Obviously, don't hold me to this, but I believe that the most expensive pricing is roughly as follows (in USD):
A five server farm would cost at most:
Total cost in licenses: $2,850 In practice, it would be less. You wouldn't necessarily need to have DPM installed on each web front end, for example. You don't necessarily need enterprise licenses either. The user interface is seems very simple probably would not require any special training to get up to speed. I did ask about that specifically and there is apparently a 1.5 day class available, though it's not obvious to me that anyone would really need to take it. All in all, I think it's certainly worth investigating if you're out there looking for a data protection solution for SharePoint. </end>
Technorati Tags: SharePoint Twitter: http://twitter.com/pagalvin April 16 Walk-through: Fix Employee Training Template Available Seats Unregister BugAs many people know, the Employee Training template provided by Microsoft here has a bug that we can reproduce following these steps:
Solution: Use SharePoint Designer to correct the workflow. First, open up the site. The folder list for me looks like this: If we have a look at the "Attendee registration" workflow, we see that there is a step labeled "Enforce seating policy". It looks like this: This step in the workflow updates the item by incrementing the "Filled Seats" metadata column on the course. If we pull that up in more detail, we see this: That's all the information we need to fix the unregistration workflow. If we flip over to the unregistration workflow, there is no similar workflow step. Add it as follows: 1: Expand "Attendee unregistration" and open up the XOML (see first screen shot if you're lost). 2: Add a new workflow variable, "New Filled Seats" of type "Number". 3: Assign a value to "New Filled Seats" as shown: 4: Decrement the Filled Seats by 1: 5: Update the related Course item: 6: Make sure all the steps are in the right sequence. For me, it looks like this: 7: Finish the workflow to re-build it. 8: Test. </end> Technorati Tags: SharePoint, Workflow April 12 Random Saturday Morning ObservationI've been in classes these past two weeks and one thing that strikes me is that there are a lot of thoughtful, smart people working on SharePoint (as consultants or IT staff) who don't blog, twitter, seem aware of public message boards like MSDN forum or SharePoint University, maintain Facebook or LinkedIn profiles, etc. They are pure information consumers. Not bad, just interesting. </end>
Technorati Tags: Consulting April 11 Codeplex & RSSNot sure if everyone realizes, but codeplex has a nice daily updates RSS feed that I find very helpful.
In addition, all of the codeplex projects have their own feeds.
Every day, I scan through it and add any sharepoint related projects' feeds to my gmail reader.
</end> April 10 Twittering Away ...at http://twitter.com/pagalvin Sadly, I cleaned out my gmail account hours before signing up, so it didn't find anyone when it searched for contacts. If you're using Twitter, let me know and I'll gladly connect. </end> Content Query Web Part: Speaking at New York SharePoint Users GroupI will be speaking with my colleague, Natalya Voskresenskaya, at the New York SharePoint Users Group meeting Wednesday May 7th. Thanks to Bob Fox for throwing our names into the hat and helping us get this opportunity! Our overall topic is the Content Query Web Part and we hope to give some useful information to two distinct audiences:
Here is the notice NYSPUG mailed out earlier this week: "Using Content Query Web Part to Solve Business Problems". MOSS 2007's Content Query Web Part (CQWP) enables users to create custom views of data queried from many sources, and present that data in one place. Despite its powerful query & content refinement options, CQWP is often an underrated and overlooked feature. CQWP is both a "data extraction engine" (find documents or list items anywhere in a site collection) and also a first-class presentation tool that enables users to control how content is presented by wrapping HTML and styles to format the display nearly any way you wish. In this demo-heavy session, they will show how to use the CQWP to solve business problems by showing off core features.
</end>
Technorati Tags: Public Speaking April 08 FAST SharePoint Integration: Execute a Simple QueryThis is a continuation in my FAST coding mini-series for SharePoint folk. The bit of code below executes a search for the term "test" in FAST via a Console application. Obviously, it's a hop, skip and jump away to wrap this logic inside a web part or application page:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections.Specialized; using Com.FastSearch.Esp.Search; using Com.FastSearch.Esp.Search.Http; using Com.FastSearch.Esp.Search.Navigation; using Com.FastSearch.Esp.Search.Query; using Com.FastSearch.Esp.Search.Result; using Com.FastSearch.Esp.Search.View; using System.Collections; namespace Conchango { class InvokeSimpleFASTQuery { static void Main(string[] args) { #region Initialize our communication with FAST ISearchFactory searchFactory; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory"); nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15100"); nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET"); searchFactory = SearchFactory.NewInstance(nameValueCollection); #endregion #region Launch a query string queryString = "test"; Query query = new Query(queryString); query.SetParameter(BaseParameter.CLUSTERING, false); query.SetParameter(BaseParameter.NAVIGATION, true); query.SetParameter(BaseParameter.NAVIGATION_DEEPHITS, 100); ISearchView searchView; searchView = searchFactory.GetSearchView("sharepointconn"); IQueryResult result = searchView.Search(query); Console.WriteLine("Total results from search: [" + result.DocCount + "]."); int docCounter = 0; while (docCounter < result.DocCount) { docCounter++; IDocumentSummary thisDocSummary = result.GetDocument(docCounter); Console.WriteLine("[" + docCounter + "]: " + thisDocSummary.GetSummaryField("url").StringValue); } // while Console.ReadLine(); #endregion } } } It generates the following result: </end> April 07 FAST SharePoint Integration: Sample Code to Display All Available FAST Views
Here is some code that shows all available views from a FAST server based on the named QRServer (the server process with which we communicate). I offer this up to give you all a taste of what it's like to use the provided FAST API.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Com.FastSearch.Esp.Search; using Com.FastSearch.Esp.Search.Http; using Com.FastSearch.Esp.Search.Navigation; using Com.FastSearch.Esp.Search.Query; using Com.FastSearch.Esp.Search.Result; using Com.FastSearch.Esp.Search.View; using System.Collections.Specialized; using System.Collections; namespace Conchango { class EnumerateFASTViews { static void Main(string[] args) { ISearchFactory searchFactory; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory"); nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15100"); nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET"); searchFactory = SearchFactory.NewInstance(nameValueCollection); Console.WriteLine("Total Views: [" + searchFactory.GetSearchViewList().Count + "]."); int i = 0; foreach (object o in searchFactory.GetSearchViewList()) { Console.WriteLine("View [" + i++ + "]: [" + o.ToString() + "]."); } Console.ReadLine(); } } }
Note that I consider myself a barely competent C# programmer and I have thin skin, so don't send any raspberries my way, especially re: the "foreach (object o in ...)" construct :) </end>
April 04 FAST and SharePoint Integration First LookI've been lucky to have an opportunity to work on a FAST <--> SharePoint integration project and thought I'd continue to share my limited experience with the community. Microsoft is in the process of purchasing FAST. I don't know anything about the schedule except that it should be finished in the "2nd quarter" which I assume means by 06/30/08. My project's design, at a very high level, calls for creating a few web parts that have roughly the same look, feel and functionality as the standard MOSS search box and core results web part, but pulling from FAST. I've made some baby steps in that direction. FAST is a dedicated search engine. It's not based on Microsoft technology, though it's obvious to me that some of the FAST engineers clearly understand MS tech (or they've made use of contractors). FAST:
MOSS:
That's it for now. As I progress through the project, I'll post more. </end>
April 01 Good Bye, Conchango. Hello EMC! |
|
|