Car insurance

Archive for Sharepoint

Sharepoint Workflow: Simple!

// October 18th, 2007 // No Comments » // Sharepoint

So i decided to experiment with Custom Sharepoint Workflow today and i am impressed. My task was simple.

The client had a calendar where she wished to alert users of upcoming quizzes. I managed to draw a list of email addresses from another list using the calculated column. The date of email was up to her to set. Once done the workflow would send out email alerting the user of an upcoming quiz date.

I searched around for some help on workflows and found the following the following series of blog posts which were incredibly helpful. Thanks very much to Sahil Malik.

Following the blog posts made it really simple for me and i recommend that you use them if you have not worked with workflows before. I wont bother to duplicate screenshots because they are all there! However if you do have any questions, email me and i’d be more than happy to help you!

Google Analytics and Sharepoint 2007

// October 10th, 2007 // No Comments » // Sharepoint

Recently at work we’ve been tasked to come up with a great way to report on the statistics of the intranet. Although MOSS 2007 provides some form of statistics, it is not enough. It suddenly struck me whilst sitting down to research the problem at hand, why not use Google Analytics? I have a couple of websites which i use it for and its superb.

Then the question of internal and external came wondering into my head…. Well i’ve embedded the required javascript into the masterpage! My reason being that the server on which MOSS 2007 is installed on has internet access, so surely it would be able to report on usage?

Well i found this answer from google, check it out here

SP Lists: Code to get a list of options

// July 9th, 2007 // No Comments » // Sharepoint

Recently, i had to write a web part which got one of the fields in the list, a field which was of type checkboxlist column. It proved a lot harder than initially expected, but heres in the code in the end:
<br /> using (SPSite mySite = new SPSite(serverName + _contract_path))<br /> {<br /> using (SPWeb myWeb = mySite.OpenWeb())<br /> {<br /> SPFieldCollection lstContracts = myWeb.Lists["Contracts"].Fields;</p> <p> ArrayList surveyFields = new ArrayList();</p> <p> foreach (SPField field in lstContracts)<br /> {</p> <p> if (field.GetType() == typeof(SPFieldMultiChoice))<br /> {</p> <p> surveyFields.Add(field);</p> <p> }</p> <p> }</p> <p> SPFieldMultiChoice[] returnFields = new SPFieldMultiChoice[surveyFields.Count];</p> <p> surveyFields.CopyTo(returnFields);</p> <p> //SPFieldChoice choiceField = returnFields[1];<br /> foreach (SPFieldMultiChoice choiceField in returnFields) {</p> <p> if (choiceField.Title.ToUpper() == "CONTRACT STATUS") {</p> <p> foreach (string choiceName in ((SPFieldMultiChoice)choiceField).Choices)<br /> {</p> <p> lstStatus.Items.Add(new ListItem(choiceName));</p> <p> }</p> <p> }<br /> }<br />

Using SPFieldChoice instaed of MultiChoice you can get options for the drop down boxes too!! Hope this helps

}
}

Creating a Custom Edit Form (editform.aspx) for Document Libraries

// July 3rd, 2007 // 1 Comment » // Sharepoint

So after much pain and suffering i have figured it out.

1. To create a custom edit form where you can edit the editform page and create the controls as you want them is pretty easy. Just go to the particular list you wish to customize in Sharepoint Designer, copy the original editform.aspx and open up the editform.aspx copy. In there delete the listform webpart and go to insert -> Sharepoint List Controls -> Custom list form.

2. Choose the appropriate options
3. Cutomize the form
4. Save it
5. Check it works in the browser

Now the big part: To make the list or document library actually use the new editform you just created you need to right click on the Sharepoint Library and go to properties. In there click on List properties

Click the supporting files tab

Choose your new page and bam you get the error:

“the page you have selected does not contain a reference to the correct sharepoint list”

I HAVE FOUND THE SOLUTION. After 3 days of trying!!

1. Go back to the original editform.aspx. Copy the whole listform web part including the web part zone: so the whole tag into the new form. So now you have 2 zones. Rename the WebPartZone ID which has the DataFormWebPart to Main1 or whatever you wish.

2. Save the form and preview it
3. You now have the original ListFormWebPart and the DataFormWebPart on the page. Check that your ok and cancel buttons fire ok
4. In the ListFormWebPart set IsVisible false /IsVisible

Save the form and try to link the new form as the new editform. And it works!!!

Paperless business: A must

// June 26th, 2007 // No Comments » // Sharepoint

Whilst chatting to my mom the other day, i realised how much of the world’s businesses still ran on paper based systems. My mother works for a group of anaesthetists (hope i spelt it right mom), who as advanced in their everyday activities as specialists, still used paper based systems to record such info as patient details and other business related info. They then store these yellow cards at the local paper storage company, Metrofile, who when i last checked, are doing extremely well for themselves, which i suppose lead me to my first point.

This morning i went out to a client in Midrand, who is a chemicals storage and packaging company with a turnover of more than R350 million a year. However when they had incoming orders, product changes, rejections and requests, it was handled by people and paper chaging hands, which is just so unreliable. An example of this was in fact right there when we were asked if this process could be workflowed through Sharepoint (which obviously it can) and the forms we were looking for to create them a Proof of Concept Sharepoint system werent there; yes, one of staff was sick and had all the forms, which just proves my point to the tee: Can you rely on document flow and management with just people?

Hell no!

Just my 2c

My rocking RSS Web Part

// May 29th, 2007 // 2 Comments » // Sharepoint

In Sharepoint, customizing the look and feel of the site needs to be done by a developer, someone who has skills in Sharepoint Designer and a lot of patience. Even still the design is limited. In my experience, we end up with a highly functional site, but very limited design options. However, im about to take over the Sharepoint world!

In Sharepoint 2007, every list has a RSS option, where the list is available in RSS. So when a list is filtered, sorted or whatever the case is, there is always an RSS option. So my ingenious plan is to use this RSS to provide the functionality which Sharepoint has, ie the lists and filtering, sorting etc etc, but within a design friendly environment.

SO in the end i would like to provide a web part which styles the RSS in any way you wish. So if we have a list with:

Event Title
Start Date
End Date
Event Description,

have a html designer for these items and place them in some html code to create the design you want! so in the design we’d have:

table tr td {event title} /td /tr tr td {start date} /td td {End Date} /td /tr etc

Then the ability to add marquee and img tags and all those kinds of things is easy thus creating something which looks great and functions well.

Anyways, im working on the RSS stuff at the moment, ill let everyone know when its done!

Smartpart for MOSS 2007 (Well kinda)

// May 16th, 2007 // No Comments » // Sharepoint

Not really smart part, but a similar method of creating web parts VISUALLY using web controls (ascx) pages. It definitely works cause i tested it.

Here’s the link to the article

You will need to have the Visual Studio 2005 Web Application template installed which you can grab here as well as the update you need for VS 2005 here

Sharepoint is still not easy to use

// April 20th, 2007 // 1 Comment » // Sharepoint

I’ve been apprehensive to write this post since there is a lot of hype about Sharepoint 2007 and its great capabilities. However I am one of those that likes to get down to the nitty gritties of a system and what I have found has disappointed me.

It is still not easy to write a web part. Sure there is an upload interface now but you still require smart part to create the web part and copy the assembly file into GAC and all the rest.

Im using the Content Query Web Part trying to display custom fields from a custom list. Why couldnt the developers query the custom list and return a list of fields one could use when you browse for the custom list? Why must we go and edit the itemstyle.xsl?

Im not going to carry on because Sharepoint 2007 is still full of bugs which need to be fixed. Bring on the Service packs

Content Query Web Part

// March 15th, 2007 // 2 Comments » // Sharepoint

I sometimes think that Sharepoint has a major design issue in that its really hard to customize it to exactly how you would want it to look. A lot of people who dont understand Sharepoint dont realise that because its a Content Management System, amongst its hundred different other assets, its hard to create an exact look without sacrificing functionality.

The Content Query Web Part has solved this on some level, by being able to query any web part and return satisfactory results, and eliminating the ugliness of the Sharepoint List. It has some awesome power too. For instance today I used to display both past and future events from a Calendar List Web Part. Previously I’d probably have to create a filtered view on the Calendar List Web Part.

So give it go, itll save you some time with your clients, and theyll be more impressed by the look and feel!!

Google rocks my world

// March 8th, 2007 // No Comments » // Sharepoint

I recently become very interested in the array of Google gadgets which are available and im busy downloading the Google Desktop tool. The calendar for me is the most interesting as Im terrible with birthdays and events. However this tool makes my life really easy. I’ve set it up to sms me whenever there is an event which i’ve added to my calendar. Now i can look like the fabulous friend when i remember everyone’s birthdays just by receiving a FREE sms from Google reminding me.

What interests me even more is the developers API which they’ve produced which allows us nerds to use their calendar to create our own applications and events which use the calendar and therefore all the features of it.

For instance, i just bought the new HTC Tytn phone which has a Windows Mobile 5 Operating System (OS) and im really keen to write someting which allows you to add events to your google calendar. This will allow me to be smsed and possibly share these events with the whole world through the website I expose this calendar on… confused? read on?

They make it really easy to add a calendar to your own website, which not only shows the events you have listed but allows people to add to your calendar’s events if you wish them to.

It blows my mind how awesome this company is, how open they are, and how they will never ever stop perservering in the quest to make everyone elses life easier…. big up

I suppose they do have a lot of money to do that!!