Showing posts with label sharepoint. Show all posts
Showing posts with label sharepoint. Show all posts

12/06/2014

SshhhharePoint

Many of my engagements with customers and indeed other consultancies invariably have an 'intranet' element within the requirements.

I remember a while back when SP2010 was released and many of use realised that demonstrating the OOB user interface was not the best approach; where the customers response was invariably muted and unimpressed.

So I have been considering how we approach SharePoint engagements and indeed how we could approach them with a more practical business approach rather than a technical one.

Many of us are 'techies' - SharePoint solutions architects, SharePoint solutions developers and so on.
Many of us are also heavily engaged in SharePoint presales and SharePoint customer demos.

One thing we all have in common to some degree is that we are proud to be 'SharePoint' people....we love the product, love the architecture, love its nuances and all of the rich business functionality that it provides.

So it comes as no surprise that when we engage with customers we engage with them with our SharePoint hat on.
We are going to solve our customers business problems, inefficiencies and overheads with a SharePoint solution....and we tell them that.

But should we take our SharePoint hat off?

The phrase or word 'SharePoint' has many connotations depending on who you engage with. In some information management communities it is treated as the black death, in others it is the fix for world hunger, world peace....you get the idea!

When a user fills in their timesheets then don't think 'My timesheet has been created by system X'.
So it makes sense that when a user interacts with their intranet or information management system they don't consider what system it has been created on.

What is important to the user is that it makes their lives easier, enables them to work more efficiently and to be more productive during their working day.

What is important to the business is more efficient users = more efficient business = cost reduction through efficiency.

So what is the best approach with a SharePoint solution for the client?

We should be engaging with the client without SharePoint specifics...rather with solution specifics.

Should the user care that it's SharePoint...absolutely not.
Should the user know that it is SharePoint ...it shouldn't matter what it is.

We develop our thoughts around a solution based upon SharePoint and that's a given as we are going to use SharePoint as our platform of choice.

But we often communicate the solution in terms of SharePoint but is that really the best way to present a solution?

Perhaps we should present the solution as a solution...I know that sounds obvious but in reality many of use stick our SharePoint hat on and start talking SharePoint solutions; SharePoint specifics.

Obviously this may depend on the level of engagement, but how often does a records manager, a CEO or an information worker have to know the underlying technology?

Sure the IT team will have a vested interest but engaging with the end users and information workers shouldn't require a SharePoint hat, in fact it may just muddy the waters.

Is that really SharePoint?
Does it really matter?









01/11/2012

WSS Emailing Itself -: x-mailer: Windows SharePoint Services (version 3)

I had a case recently where a client wanted to send access request emails to an email enabled document library. We encountered the problem of WSS not being able to handle the x-mail header.
A solution was to create a vbscript that fired when an email entered the 'Drop' folder of IIS mailroot and stripped out the problematic header.
Initial testing proved successfull and this has now been implemented.
solution
1. copy Smtpreg.vbs into the c:\inetpub\AdminScripts - smtpreg is available to download from MS.

2. create a vbs file from the script below and copy it to the AdminScripts folder (I named mine wss)

<SCRIPT LANGUAGE="VBScript">


Sub ISMTPOnArrival_OnArrival(ByVal iMsg, EventStatus )

if iMsg.Fields("urn:schemas:mailheader:x-mailer") = "Windows SharePoint Services (version 3)" then
iMsg.Fields.Delete("urn:schemas:mailheader:x-mailer")
iMsg.Fields.Update
end if

iMsg.DataSource.Save
EventStatus = 0
End Sub




3. run the following commands to register the script

cd c:\inetpub\adminscripts
cscript smtpreg.vbs /add 1 OnArrival DeleteMsg CDO.SS_SMTPOnArrivalSink "mail from=*"
cscript smtpreg.vbs /setprop 1 OnArrival DeleteMsg Sink ScriptName "c:\Inetpub\AdminScripts\wss.vbs"

4. This will now catch all mail on arrival and remove the offending header.


26/04/2012

JQuery for SharePoint made simpler

Here's some simple JQuery to help you avoid looking for those annoying GUID's

var list = [];
var peoplePicker1;
var peoplePicker2;
var currentObject;

$(document).ready(function() {

// use this ^ for wildcard hiding/showing all items that begin with "xxx"
$('[title^="xxx"]').closest('tr').hide();
$('[title^="xxx"]').closest('tr').show();

$('DIV[id^="sectionSection2"]').hide();

// will need this to hide date/time fields
$('nobr:contains("Hire Car")').closest('tr').hide();

// use for text fields and drop down lists
var x = $('[title$="Authoriser"]').val();

// use for radio and checkboxes
// where title$ is the choice option
$('[title$="Enter Choice #1"]').click(function() {
alert('Please ensure you complete the Tracking section');

// get the radio button id
var tmp = $(this).children('input').attr('id');

// check its value
alert($("input[id="+tmp+"]:checked").val());
var checked =  $("input[id="+tmp+"]:checked").val();
if(checked == 'on')
{
// do something
}
});

// use for people pickers
// add each people picker to an array and assign it to a var
// start loop
$(".ms-inputuserfield").each(function(){
list.push($(this).text());
currentObject = $(this);
});
// end loop
peoplePicker1 = list[0];
peoplePicker2 = list[1];
currentObject.attr('disabled','disabled');

var currentUser = $().SPServices.SPGetCurrentUser({
 fieldName: "Title",
 debug: false
});

// check if the user is an admin user
function isAdmin(user)
{
    var adminUser1 = "System Account";
    var adminUser2 = "john smith";
    var adminUser3 = "john doe";
    var adminUser4 = "dave nixon";
    var adminUser5 = "fred smith";
if(user == adminUser1 || user == adminUser2 || user == adminUser3 || user == adminUser4 || user == adminUser5)
{
return "admin";
}
else
{
return "not admin";
}
   
}
function CheckForAttachment()
{
  var elm = document.getElementById("idAttachmentsTable");
  if(elm == null || elm.rows.length == 0)
  {
    alert("No e-training form attached");
    return false;
  }
  else { return true; }
}
function PreSaveAction()
{
  return CheckForAttachment();
}




});

14/11/2011

IPSV Term Store for SharePoint

Following on from the LGCS here's the IPSV

Please note this has nearly 8000 terms in the csv and will take a long time to import into the term store.

Useful for those still wanting to use this huge vocabulary in SharePoint 2010

IPSV Term Set

14/07/2009

SharePoint List Summaries & Reports with XML

One of the drawback of SharePoint lists is the ability to actually roll-up, report and summarize the data.



Sure we can open datasheet view and use the office web components but what if we want a summary of all the data as soon as we open the list.

This can be easily achieved with a little XML and a dash of SharePoint Designer!




In this list we have a rollup summary below showing calculations and a little progress bar for the project progress.

Here's how you do it:

1. Using SharePoint designer, insert a data view web part under the List by selecting Data View > Insert Data View from the main menu.

2. Expand the Shareoint Lists in the Data Source Library Task Pane and select the list or library that contains the information you wish to display. From the drop down select 'Show Data' to populate the Data Preview tab.

3. From the list of columns, select the ones that you wish to display and select ‘Insert selected fields as… multiple item view' from the drop down menu at the top of the window.

4. Now lets look at the code generated for the DataView....


a. The following line shows the data fields that we are going to work with



@Title,Title;@Resource,Resource;@Effort,Effort;@Project_x0020_Activity,Project Activity;@Planned,Planned;@Planned_x0020_Cost,Planned Cost;@Actual_x0020_Cost,Actual Cost;@Profit,Profit;@Rate,Rate;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;


b. Now look for the following lines


xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>

<td class="ms-vh" nowrap="">
<?xml:namespace prefix = xsl /><xsl:text escaping="yes" preserve="yes" ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">&amp;nbsp;</xsl:text>

We are going to add our bespoke data immediately after these lines



c. Declare our variables and any calculations we want to add


<span ><xsl:variable select="format-number(/dsQueryResponse/Rows/Row[@Rate='1000'], '#####')" name="a">
<xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='1000']/@Planned)" name="planned_pm">
<xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='1000']/@Effort)" name="effort_pm">
<xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='800']/@Planned)" name="planned_con">
<xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='800']/@Effort)" name="effort_con">
<xsl:variable select="53 - ($effort_pm + $effort_con)" name="project_remaining">
<xsl:variable select="($effort_pm + $effort_con)" name="project_cost_days">
<xsl:variable select="($effort_pm * 1000) + ($effort_con * 800)" name="project_cost_value">
<xsl:variable select="format-number($project_cost_days div 53 *100, '##')" name="project_cost_pc"></span></xsl:variable></xsl:variable></xsl:variable></xsl:variable></xsl:variable></xsl:variable></xsl:variable></xsl:variable></xsl:variable>
<xsl:variable select="format-number(/dsQueryResponse/Rows/Row[@Rate='1000'], '#####')" name="a"><xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='1000']/@Planned)" name="planned_pm"><xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='1000']/@Effort)" name="effort_pm"><xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='800']/@Planned)" name="planned_con"><xsl:variable select="sum(/dsQueryResponse/Rows/Row[@Rate='800']/@Effort)" name="effort_con"><xsl:variable select="53 - ($effort_pm + $effort_con)" name="project_remaining"><xsl:variable select="($effort_pm + $effort_con)" name="project_cost_days"><xsl:variable select="($effort_pm * 1000) + ($effort_con * 800)" name="project_cost_value"><xsl:variable select="format-number($project_cost_days div 53 *100, '##')" name="project_cost_pc"><span style="color:#ff6600;"></span>


d. Create our table to hold the values and then add our variables


<table class="ms-propertysheet" border="0" bgcolor="white" width="100%">
<tr><td valign="top">
<table class="ms-vb">
<tr><td><b>Project Management</b></td></tr>
<tr><td>Planned PM Days: </td><td> <xsl:value-of select="$planned_pm"/></td></tr>
<tr><td>Actual PM Days: </td><td> <xsl:value-of select="$effort_pm"/></td></tr>
<tr><td>Profit PM Days: </td><td> <xsl:value-of select="$planned_pm - $effort_pm"/></td></tr>
<tr><td>Profit PM Value: </td><td> <xsl:value-of select="($planned_pm - $effort_pm) * 1000"/></td></tr>
</table>
</td><td valign="top">
<table class="ms-vb">
<tr><td><b>Consultancy</b></td></tr>
<tr><td>Planned Consultant Days: </td><td> <xsl:value-of select="$planned_con"/></td></tr>
<tr><td>Actual Consultant Days: </td><td> <xsl:value-of select="$effort_con"/></td></tr>
<tr><td>Profit Consultant Days: </td><td> <xsl:value-of select="$planned_con - $effort_con"/></td></tr>
<tr><td>Profit Consultant Value: </td><td> <xsl:value-of select="($planned_con - $effort_con) * 800"/></td></tr>
</table>

And the pretty looking progress bar!


<</td><td valign="top">
<table class="ms-vb">
<tr><td><b>Summary</b></td></tr>
<tr><td>Project Remaining: </td><td> <xsl:value-of select="$project_remaining"/></td></tr>
<tr><td>Project Days Taken: </td><td> <xsl:value-of select="$project_cost_days"/></td></tr>
<tr><td>Project Cost Taken: </td><td> <xsl:value-of select="$project_cost_value"/></td></tr>
<tr><td>Project Profit : </td><td> <xsl:value-of select="($planned_pm - $effort_pm) * 1000 + ($planned_con - $effort_con) * 800" /></td></tr>


</table>


5. And that's pretty much it!

A mixture of SPD and a little xml calculation and you can achieve a quick solution to fill the gap in functionality that the list doesn't give us.

My next post will illustrate how to create and manipulate xml variables in MOSS Lists