Category: code

Set a SharePoint people field with jQuery

When I talked about how to update fields in SharePoint, I was talking about the easy stuff: input fields and stuff. Now, I wanted to update / set a SharePoint people field on my form. I did some googling and found a solution by Marc D. Anderson (in my opinion he is THE authority on sharepoint …

How to format numbers with commas in SharePoint Dataview (using decimal-format functionality)

In a dashboard project we had to display certain valuta fields that came from a SQL-SERVER table.Those fields had following formatting: 139367709,8800 0,00000,00 51345998,3700 The goal was to display them as European style valuta: 139.367.709,88 0,00 51.345.998,37 To format those numbers to numbers with commas in SharePoint Dataview I used the xslt format-number() function Result was empty …

Loading dates via SharePoint Designer Datasource creates problems with daylight savings time

At a dashboard project I was using the SharePoint Designer DataSource functionality, getting data from a SQL-Server (more on why in this blogpost). I was having a funny issue however: all dates I got from SQL-SERVER had 1 hour off. When I had the date “15/10/2011” in SQL, I would have “14/10/2011 23:00:00Z”. Sidenote: in …

Remove original message from a SharePoint discussion forum reply via jquery

Someone on the MSDN forum asked how to remove the original message when replying to a thread.
That smelled like a jquery job to me!!Here is the code.

Set the width of multiple lookup fields in SharePoint via jQuery

Get the value of a SharePoint People Picker field via javascript

The ever handsome and cunning Marc D. Anderson (I felt like giving the man credit, since I use so many of his solutions!!) saved my behind once again with a fantastic javascript!
This time I was looking to find a solution to get the value from a people picker field via jquery.

Rename item in order to work when you create a new item based on the title

Quite a title this time 🙂 Let me explain: I have a list where people can add items to: requests for a ticket. Those tickets are ( if approved ) getting into a workflow: every ticket becomes a folder in a list, where we can have actions as list items. The problem was that my …

add a PreSaveAction on the SharePoint "input type=button"

My previous blogpost was about how you could replace the SharePoint:SaveButton with a input type=Button in order to add a redirect after you have filled in the form. Today I wanted to add the PreSaveAction() functionality and it didn’t work. After some research and testing I found out that the input type=Button does not have …

How to check for attachments or limit the number of attachments in SharePoint via jQuery

A client had a business requirement that if someone added an attachment to an item in a list, a metadata field had to be filled in. So I put on my jQuery glasses (they are quite special, looking a bit like Dame Edna’s) I ended up with following code which uses the PreSaveAction, a default …

jQuery Cycle plugin for an easy to code picture slider

why bother with costly external picture sliders or Silverlight scripts that have to be developed and deployed when you can simply use jQuery Cycle plugin?