in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

OBA, SharePoint and Aghy [MVP]

December 2007 - Posts

  • Case Study: "MOSSkola"

    Introduction: In Hungarian, "iskola" means "school". In the old time, "iskola" was used as "oskola"... So "MOSSkola" is a play on words in Hungarian, meaning "MOSS school".

    So, MOSSkola is a special online course. The registered students gets the lessons by e-mail, once or twice a week, depending on his/her subscription date. The full course is 90 days long and contains 20 lessons. All e-mail contains a short lesson (3-4 sides) about a special topic of SharePoint 2007. For example there are lessons about Document Management, Lists, Searching, Workflows, BI Functions, etc.

    In the first time, the MOSSkola was manual, but nowadays it's fully automated. There's only one thing which couldn't be automated: I have to write the lessons manually ;)

    Our website is based on Drupal, you can find here the registration form. After submit this form, your data is loaded to a MySQL Database - from here an automated script loads them into a custom SharePoint list.

    In this list we store the user name and e-mail, and the registration date. The list contains other calculated columns for the lessons, based on registration date. For example the last lesson date is RegistrationDate + 90.

    On the SharePoint server there is a Timer Job scheduled for daily running, which is responsible for e-mail sending, through the following steps:

    • Iterates the SharePoint list items, and collecting items which has the current date as a lesson's date. It collects [user, lesson] pairs, for example [aghy, 13_Workflow_2].
    • Reads the data of e-mails to send from an XML file, which matches the following schema:
    <Lesson DateColumn="CsopMunka_Komm"      <-- The column containing the lesson's date.
    State="01. - Csoportmunka, kommunikáció"      <-- The state of current user after sending the lesson
    File="01_CsoportmunkaKommunikacio.pdf"      <-- The name of atached PDF file (cintaining the lesson).
    MessageTemplate="01_Csoportmunka.xml" />      <-- The name of the XML file, which is the schema of the e-mail message.
    • The e-mail sending is the task of a WebService, according to [user, e-mail, status] arrays.
    • At the end the Timer Job set the status of users to the current value.

    The custom SharePoint list is like that:

    By the way, the Timer Job writes another SharePoint list as well: it's a log, a special history-list, which contains the mails sent, and status-changes. It's a comfortable method to track what happened (or not happened) - with an e-mail (or RSS) alert we can track all days the MOSSkola, and we can do some troubleshooting, if needed.

    I use the SharePoint Wiki to write the lessons, and convert them into PDF (stored in a Document Library). The config XML files are stored on the server, in the file system.

    The most important advantage of this solution is the reusability: the e-mail sending Web Service, and the whole MOSSkola engine is reusable as well. By the way, with some new config files (and lessons, of course), we can start some new MOSSkola-semesters also... 

  • Business Data on the Document Information Panel

    The business needs:

    The documents stored in the Document Center have own content types, the default Document content is not used. Recording these documents is managed by a software out-of-the SharePoint (MOSS 2007), the recording data is stored in a MS SQL 2005 database. We need to display all these data in many formats:
    • on the DispForm.aspx of all documents
    • on the Document Information Panel (DIP) of all documents (different layouts for different content types)
    • inside the documents

    The problem:

    If we use only "traditional" data types (not business data), it"s quite simple: create a custom DIP and assign it to the content type. But we cannot create a site column from business data - so we cannot display a BDC site column on the Information Panel....

    The solution:

    Fortunately, the DIP assigned to a content type is similar to columns: we can define it at site level, but we can override and customize this at library-level. So the solution's steps are:

    1. Create a content type, with the appropriate site columns and with special DIP if you need.
    2. Cretae the document library, which will use this content type.
    3. Assign the content type to the document library.
    4. Create Business Data columns for the document library.
    5. Customize the content type's DIP at the document library:
    • Document Library settings --> Content Type settings --> Document Information Panel settings --> Edit this XSN form
    • Create a new Data Source in the InfoPath form, from the current Document Library.
    • Add the Business Data columns from the new Data Source to the Information Panel. Create the views, layouts, etc.
    • Save and publish this DIP and enjoy it!


     

  • Document Information Panel

    In Office 2007 we can show the document's properties on the Document Information Panel (DIP), for example in the header of the Word. In fact, this Information Panel is an Infopath form, which can be modified. Server-side, on SharePoint 2007 we can associate it to the document content types. For example, the DIP can be different for a contract or for a specification...

    On the admin site of content types we can find a link: "Document Information Panel settings". Well, we can change the default DIP here: modify the existing template or upload a new one.

    How can we do that? - Yes, the DIP is an InfoPath form! We can edit this Panel in the InfoPath: here we can insert pictures (for example the company's logo) or fields, change the layout, etc. See the picture above, which is a Word document's Information Panel (in Hungarian).

    If we start to use the InfoPath, we can see, that the server-side Information Panel contains two "pages": one for the server-side properties, and one for the "traditional" client-side Word-properties. How are these setting stored in the background? Can we change them? Can we make a new one?...

    Good news: yes, we can! These "pages" are the views of the InfoPath form. We can order the fields between the views, and the fields and views as well can be read-only... Surprise! 

    Wow!...

  • Site and Page

    When I teach a course or give a consultancy for a customer, I've got the question frequently: what's the difference between the "site" and "page"? It's difficult to say that. It's difficult to say that to everybody, including also end users who aren't IT workers.

    According to my experiences, everybody likes the spectacular metaphors. So I've found a quite simple metaphor, which describes the differences and the connections as well between sites and pages.

    Imagine a big ball made from glass - this is the site. We can have some things inside this ball: lists, libraries, etc. But the surface of this ball is humid, we have to clean this if we want to see in. These dehumidified "windows" are the pages, showing some view to the content of the site-ball.

    Certanly, we can have more pages (windows). Through these pages we can see several aspects of the ball's content...


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts