Archive

Archive for the ‘SharePoint’ Category

How do I: Set the ID attribute of a table row using jQuery and SharePoint Designer

November 9, 2012 Leave a comment

While customizing an “add new item” form, you might find yourself needing to manipulate form elements via jQuery. However, before you can do that you must and an #id or .class to the elements in question. I will be adding an #id in this demonstration. But why would I want to manipulate form elements in the first place? If you wanted to hide/show a textbox based on the user selection of a checkbox you could use this technique.

Get the code

Related videos:
Advertisements

SharePoint Designer 2013 #SPD2013

November 6, 2012 10 comments

I have seen a lot recently about the changes to SPD 2013 and especially the removal of the Design View from page editing and the impact that would have on peoples normal daily SharePoint work. The rational for the change is here on the SharePoint team blog, some of the responses on End User SharePoint are worth a read, and non of them are very positive. So I thought I would take a look a couple of typical End User style visual solution and see it can see be used in the brave new world of SPD2013.

 

Using calculated columns to add colour coding to your SharePoint lists

This excellent solution comes from Sarah Haase. I won’t cover the steps for 2010, but will go straight into 2013.

The 1st step is to grab a copy of SPD2013 preview from the MS download site and get this running in your SP2013 world, then setup your list and calculated column and open your site in SPD2013, at first glance a site in SPD2013 looks exactly the same as an SPD2010, but when you open the list-view you have the option of code view or code view, nice !

So how do we make appropriate change now that we have no visual representation of the page ?

image

If we go to the List View Tools tab section and select the Design tab, we have the option to Customize the XLST for the entire view (this is available in SPD2010 as well)

 

image

Now its a case of searching for the tag

<xsl:value-of select="$thisNode/@*[name()=current()/@Name]"/>

and updating it to read

<xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes"/>
 

Save the page view,  preview in a browser and voila, a colour coded column in SharePoint 2013.

image
     

So was this more difficult then 2010 ?, The answer is Yes and No, without the visual representation of the page it would have been much more difficult to figure out which tag to update, but once you know that, the actual change is no more difficult, but I think that is the crux of the issue, features like conditional formatting are now going to be much much more difficult to apply in SPD2013 when we are going to have to work through the entire list view code.

How do I: Implement $().SPServices.SPCascadeDropdowns

November 5, 2012 1 comment

Documentation for $().SPServices.SPCascadeDropdowns

In my opinion, the tricky part to this is the third list “CascadeExample”. It was unclear to me after reading the documentation on the SPServices website that the two columns “Country” & “Region” in the “CascadeExample” list need to be lookup columns. It might be obvious to everyone else.

How do I: Implement $().SPServices.SPAutocomplete

How do I: Implement $().SPServices.SPLookupAddNew

Hiding/Showing InfoPath 2010 form element using jQuery

November 3, 2012 Leave a comment

Get the code / Look for the highlight area

InfoPath 2010 is a great tool. However, while building forms in InfoPath it’s only a matter of time when you have a user requirment that InfoPath alone simply will not do. In that case you might have a few options. You could add custom code using VSTA, which means you will need to publish them as an administrator approved form template.You could ditch InfoPath completely and build your forms in Visual Studio 2010 using asp.net. You could build them using the client object model. Lots to think about. In addtion, you could manipulate some form element using jQuery. The video demonstrates a simple way to hide/show a textbox element using jQuery.

Using jQuery to hide form elements based on checkbox value

November 1, 2012 Leave a comment

Let’s say you wanted to hide/show a specific textbox only if a specific checkbox has been selected. You can use jQuery to do this via SharePoint Designer 2010

How can I validate a textbox using the PreSaveAction()

How do I: Create a simple form to collect data in SharePoint 2010

How can I hide/show a textbox based on a radio button selection?

How can I hide/show a textbox based on a drop-down value?

Why can’t I access the column in my SharePoint list programatically?

October 26, 2012 2 comments

The answer might be simple. The first time a column is created and you title it “Column1” the database records that. If you (or someone else) later changes the column title to “Column2” your application will break. Why? Because behind the scenes that column is still “Column1”

How do I: Create a FAQ page in SharePoint 2010

October 26, 2012 Leave a comment

This was done on a SharePoint Online site.

 

%d bloggers like this: