Note: all comments are moderated. Only SharePoint related comments allowed.

Introducing Easy Archive – Web Based Digital Archival System

January 21st, 2012 Abed Khooli No comments

It has been a while since I wrote my last post and that was for a reason. I was busy developing Easy Archive!
Easy Archive has nothing to do with SharePoint (except being built on top of the .Net Framework and Easy Archive uses version 4, not 3.5x).
Of course, SharePoint does digital archiving and document repositories and more. However, for small and medium institutions and home or professional offices, SharePoint (or rival systems) may be an overkill. This is where Easy Archive can help – it is an easy, light-weight, web-based digital archival and retrieval system. You may use it to store your correspondence, documents and files in a central location with custom security, metadata and tags. You can also relate any two documents (ex. a letter and its reply or a document and its errata).
There are 6 roles that correspond to 6 security levels in Easy Archive with full web-based user administration. Tags (keywords) can be controlled in a custom master list with auto-complete functionality. A flexible search interface is provided and users with higher privilege can export any amount of data (based on selected criteria) in csv format.
Easy Archive works with final documents (no version control or workflows). If you provide a different file for a certain record, the original will be removed. Also, if you delete a record, its file is also removed. Files are stored on the file system in folders based on document date (year) with a mechanism to prevent files with same file names from overwriting each other. Correspondence is auto-numbered and is reset annually.
If interested, you can find more in the Easy Archive FAQ.

SharePoint Saturday in Palestine

October 16th, 2011 Abed Khooli No comments

Yesterday was the second major SharePoint Saturday event in Palestine. Last year’s event was in September, 2010. In addition to local speakers, we had Joel Oleson and Paul Swider from the States and Mohamed Saleh from Jordan. My session was about designing workflows in SharePoint Designer and I wanted to share my slides here. I added a few more to illustrate the use of Visio and InfoPath and also the vacation processing logic.

Here’s the presentation in PDF format (950 KB)

How To Get A List Of Active Users In SharePoint 2010

September 30th, 2011 Abed Khooli No comments

A few days ago, a question was asked on one of the SharePoint forums. The thread owner wanted to e-mail all active users in the farm to inform them of an upcoming system reboot. In a reply, I thought about using our good old friend – the IIS log. IIS logs per web application and since a farm does not have many, it is possible to track down the relevant places to look into. But how do you define active users? The short answer is you can’t.
However, for practical purposes, you can define a time window or interval and say something like “users who have made a request in the last few minutes are most likely ‘online’ right now”. You define your time interval and zoom in to extract the users (IIS records the logged in user in cs-username column in the logs). But IIS logs, usually stored on daily basis, have so many lines and you need a tool to analyze them.
The Log Parser 2.2 (dates back to 2005) is a great tool and works well with IIS 7.5 and Windows 2008. You will be amazed by what this 1.5 MB installer can achieve. There is a help file and some sample queries in the install folder and you can see online help in this IIS blog and the log parser forums. Log Parser is a command line tool but it uses standard SQL syntax for its queries (there is a beta GUI on codeplex called Visual Log Parser).
So, I downloaded the installer, installed it and picked the current log file for my web application (you can find this from IIS under logging). The query is rather simple:
LogParser “SELECT distinct cs-username INTO test.log  FROM C:\inetpub\logs\LogFiles\W3SVC1498786109\u_ex110930.log where time > ’14:30:00′ and time < ’14:40:00′ ” -o:csv
The above line launches Log Parser, provides a select statement and defines the output format (-o:csv or comma separated format) and the file to write to (test.log or better test.csv if you want to open with Excel). My time window is 10 minutes from 2:30 pm (not a busy server, just a test VM).  As you can see, the processing is fast and an earlier time window had 3 users active.
Of course, you could count the current users in the query, but to send them e-mail you have to make some further work (map to e-mails and send the message or use some automated process that takes csv log ins as input).
The power of Log Parser should not be underestimated. You can create charts and get other reports and statistics. You can map the logs folder to a local or network drive and run Log Parser from a client machine. I just wanted to illustrate the active users as a proof of concept in the SharePoint context.

All Checked Out Documents Via Site Content And Structure

September 23rd, 2011 Abed Khooli 1 comment

The Site Contents and Structure (under Site Actions – Manage Content and Structure) is a very handy management and reporting tool at the site collection level scope. It allows you to view and drill down through site contents including subsites and you can create new sites, pages and lists as well as manage existing items (copy, move, delete) and also change settings. Out of the box, you also get a few reports and where possible, you can view related resources (ex. images that belong to a certain page).
In addition to the default (all documents), you can view My Tasks, Items Checked out to Me, Last Modified by Me, Pending Approval, Drafts, Going Live in 7 Days and Expiring in 7 Days. These are all great, but what if you need other custom reports? For example, you need all checked out documents (for any user). The answer is relatively simple. SharePoint stores report definitions (including criteria) in a SharePoint list called Content and Structure Reports (http://site-collection-root-url/Reports%20List/). The criteria uses the CAML query language. So, to add a custom report, you add an item to the list and specify your CAML criteria.
In this example, you can examine the criteria for checked out to me and adjust it. Instead of specifying current user, we look for same fields that are not null:
<Where><IsNotNull><FieldRef Name=”CheckoutUser” /></IsNotNull></Where>
Once you save the item and refresh content and structure, your new report will show in the drop down and the results will come out with no code (except CAML criteria).
You can, of course, write code to get the same result or customize the CQWP to get custom views, but the above method is simple and effective. Next time you log to your SharePoint site, try to make use of Content and Structure and feel free to add some custom reports.

Use InfoPath Form For New and Edit But Not For Display Item

September 19th, 2011 Abed Khooli No comments

InfoPath forms, where applicable and available, are a great way to improve the look and feel of your list forms and also for adding client side functionality like validation and rules. InfoPath forms disable the default SharePoint forms for new, edit and display item on a content type basis (ex. the Item content type, which is the basis of many lists). This default behavior is not desired in some cases and the ability to modify the display form (or at least use the default SharePoint version) is needed. One good example is a list that has a lookup to another list: the OOB behavior of the display form is to hyperlink the lookup value to its details form. In InfoPath form (all purpose form), this is not the case – you see the lookup like plain text. The fix is easy.
Open the list in SharePoint Designer. On the details page, in the Content Types section (lower left of the details pane), click Item (or the content type you are using). A new page opens with the content type settings. All you need to do is modify the Display Form (under Forms). Instead of ~list/item/displayifs.aspx (Item is the content type in this case), use ~list/dispform.aspx (or whichever display form you want to use). Save your changes (top left) and that’s it.