Sharepoint By Dummies

See Also:

Archive for the ‘Uncategorized’ Category

Displaying ‘Unknown’ in a date field when date isn’t known

with one comment

We have a site on Sharepoint 2010 where some of the lists have a date field but the correct value for that field isn’t known for some records.  Because of the nature of the users we do need to display something in that field even if it’s known.  This field has to be a date as it’s used in date comparisons and arithmatic (e.g. filter for when a date is past or within 12 months and apply alerters depending on if it’s passed, in the near future or further in the future) so we can’t insert the string ‘Unknown’.  We do also need, again due to the nature of someof the users, to display a meaningful string in the views, i.e. the string ‘Unknown’.

The workarouind we’ve come up with is to specify that unknown dates will be recorded as 01/01/1900 (this date will never legitmately be recorded in this sytem as an actual date) and set that as the default.  The users who will be entering data are more techie and will be instructed to use that date to mark unknown dates.  In the views that will be accessed by the non-techie users we inserted the string ‘Unknown’ into the table cell just after the data field.  Then we selected the data field and set coinditional formatting to hide it when the value is 01/01/1900, finally we selected the string ‘Unknown’ and set conditional formatting to show it when the value is 01/01/1900.  If the date is a known date it will then display the date, if it’s unknown (so set to 01/01/1900) it displays ‘Unknown’.

Not perfect but it does the job.

Written by stephenboothuk

February 14, 2012 at 2:51 pm

Fields show in Datasource for columns but not in filter dialogue

leave a comment »

Got handed a wierd issue this morning.  One of my colleagues had created a pair of .aspx pages each containingthe same set set of dataviews.  Each page displayed the same set of views but filtered by a different field (one by project the other by service area, the filter value being passed via a paramter in the URL, the service area page was a straight copy of the project page with just the field that was being filteredon being changed).

The project page worked fine, as did most of the dataviews on the Service Area page.  There were a couple of dataviews on the Service Area page where it was possible to insert the Service Area column into the dataview fore display but it (along with a number of other columns) did not appear in the filter dialogue.  This got passed to me to resolve.

I tried refereshign the datasources, to no avail.  I checked the XSL, seemed fine.  Similarly the lists seemed fine and the other dataviews on the page seemed fine.

To resolve the issue I located the filter line in the code and manaually changed the field name from the project column to the service area column.  This resolved the issue and then not only did the service area field appear in the filter dialogue but so did all the others that had previously been missing!

Searching the web for this problem returned no useful hits.

This was WSS 3.0 (aka Sharepoint 2007) and Sharepoint Designer 2007.

Written by stephenboothuk

January 13, 2012 at 1:55 pm

Posted in Uncategorized

Tagged with , , ,

Authorisations on Sharepoint 2010

leave a comment »

On one of our SP2010 sites we have a requirement for users to be able to add items to a list, view items they and others have created and to edit items they and others have created, but not delete any items whether they created them or not.  For this purpose we have created a custom permissions level (“Edit (No Delete)”) with the following:

  • Add Items
  • Edit Items
  • View Items
  • Open Items
  • View Versions
  • Create Alerts
  • View Application Pages

Basically  the Contribute permissions level with Delete Items and Delete Versions removed.

This was assigned to a group (along with the Read and Limited Access permission levels,  LA is aded by default when we create a group).  We then added the users to the group.  We’re finding that some users can work on the list fine whilst others can only view and add items.  Our attempts to resolve this are hampered by the fact that we haven’t really had any training in SP2010 authorisations and the dearth of meaningful documentation on the web about it.

Written by stephenboothuk

November 10, 2011 at 12:28 pm

Posted in Uncategorized

Changing SP2010 site to WSS3.0 template

leave a comment »

Sometimes when you’re running a Sharepoint 2010 site you want it to look like a WSS3.0 (aka Sharepoint 2007) site.  For example, one of my colleagues wanted to do this because the customer was still on Internet Explorer 6 and if they tried to use a site with the Sharepoint 2010 appearence it didn’t work, by switching it to the WSS3.0 look made it work.

It’s actually quite simple to make this change.  Open the site in Sharepoint Designer and go to the Master Pages folder.  There should be 3 files: default.master,  minimal.master and v4.master.  Sharepoint 2010 is infact basically WSS 4.0 so the default master page is v4.master.  To use the WSS3.0 template just right click on default.master and select set as default.  You will get a message box warning you that you are changing to a version 3 site and asking if you want to go ahead.  If you select to go ahead and then open up your site in the browser you will see that it now looks like WSS3.0.

You do obviously lose some functionality by doing this,  anything to do with the ribbon being the most obvious, and some SP2010 functionality does leak through (the  ‘Site Actions’  menu is slightly different to WSS3.0) but it’s pretty close.  If you do need to use functionality accessible only from the ribbon then you can easily switch back to the SP2010 template by right clicking on the v4.master file and settign as default then when you’re done change back to default.master.

Written by stephenboothuk

October 11, 2011 at 10:05 am

Posted in Uncategorized

Seeing all entries on Append field in dataview

leave a comment »

One of our users has a list where one of the fields is a multiline text field set to append new edits.  He wanted to be able to see all entries on that field in the view and to export it to Excel.

We found a link to how to display the entries inthe view, but unfortunately this stops the export working (it still shows in the actions menu but doesn’t export any data).  I have asked a question on Egghead Cafe to see if anyone there knows how we can export this information.

Written by stephenboothuk

September 14, 2011 at 5:52 pm

Posted in Uncategorized

Setting Sharepoint Form Fields Using Query String Variables, Not Javascript

leave a comment »

One of my colleagues pointed me to this page.  It shows a way to automatically populate form fields in an aspx page using parameters.

We use parameters from  controls a lot, mostly on filters for dataviews.  For an overview see my entry on putting the users name on an aspx page.  With this if you have a form on the same page (in the insert or edit template) you can automatically populate fields from controls on the page.  The only downside is that you have to select the values before opening the form.  Since you can also feed parameters from the URL used to call the page you can also use this to pull parameters from one page into the next.

We have found that this does not work on WSS 3.0 (aka Sharepoint 2007) as it produces an error when you try to save the form.  My colleague has implemented it on Sharepoint 2010 successfully.

Written by stephenboothuk

September 9, 2011 at 3:11 pm

Posted in Uncategorized


leave a comment »

Bought a new book on Sharepoint Workflows over the weekend, “Sharepoint Workflow In Action” by Phil Wickland.  I’ve been reading it today.  Interesting thing is that there’s a Kindle version as well as dead tree edition but Amazon don’t seem to offer the Kindle edition, to get the Kindle edition you have to buy the dead tree edition and then enter a code from a tabel printed on an insert in the front of the book. If you go direct to the publishers site then you can buy the Kindle version without buying the dead tree edition

I’ve been reading a bit of it today.  Might be useful.

Written by stephenboothuk

September 5, 2011 at 3:19 pm

Posted in Uncategorized

Useful link – Sharepoint 2010 Permissions Groups

leave a comment »

Found a very useful link today:-

This spreadsheet lists the out of the box permissions groups for Sharepoint 2010 and identifies which permissions it confers.  I downloaded it and added in the customer permissions groups we have so as to create a version for internal use.

One fly in the ointment, as far as we’re concerned, is that to create, view, edit or delete permissions groups in Sharepoint 2010 you have to be using the 2010 site master page (v4.master).   Unfortunately for application compatibility reasons we currently have to use the WSS 3.0 master page (default.master).

Written by stephenboothuk

September 2, 2011 at 4:52 pm

Posted in Uncategorized

If only Microsoft had a wishlist

leave a comment »

There are various things we often get asked to do with Sharepoint  which require functionality simply not available in a supportable way in Sharepoint (not even 2010).  I want to emphasise the word supportable there.  There are ways to fudge, cludge, bodge etc these things but they either work inconsistently or require you to do things that ensure that the system will not be supported and could fall apart if the servers ever get patched.  A previous administrator on one of our WSS 3.0 (aka Sharepoint 2007) sites implemented some things this way that means that we cannot migrate the site to Sharepoint 2010 without rebuilding it pretty much from the ground up (and will lose the functionality as you still can’t do it supportably in 2010).  The hosting supplier for some of our externally hosted sites said they cannot patch the server those sites are on without moving them to a dedicated farm because another customer on the same farm is using cludged functionality they know will break if they apply the patch.

Some features I’d like to see (here I’m looking at both Sharepoint and Sharepoint Designer):

  • Run workflows at set time and date (with option to recurr).  We get a lot of requests for things that need this but haven’t found a way to do it in a supportable manner.  We’ve found a number of ways to cludge it but they’re not reliable and don’t persist over server reboots.  Basically we’re looking for a CRON/AT type functionality within Sharepoint.  This would only be relevant to Site workflows.
  • Allow workflows to loop, in particular as a way to step through lists (encapsulating Document Libraries and similar as a special case of list).  Sometimes you want to step through a list and do something with each item, probably involving some sort of conditions (While {there are list items to process}, Where {condition is true} Do {some action} Until {end of list}).   Currently a site workflow can search a list for items where one field matches a certain value and process the first one it finds.  There are cludges to do this but they are unreliable and rely on the processing changing the fieldthat is matched on (else they’ll just keep hitting the same record).
  • Array variable processing in workflows and parameters.  This links to the above item of looping, as you loop through the list you build an array which after you exit the loop you use in a subsequent action.
  • Proper date arithmatic in workflows, filters and conditional formatting in XSLT views.  In workflows you can compare a date field to the current date or to some fixed date and get equals or not equals.  In filters and conditional formatting you can similarly compare to the current date or a fixed date but this adds in greater than or less than.  What you can’t do is compare to  X days before or after current date.  What we’re looking for is add the grater and less than comparison operators to workflow and add to all the ability to do arithmetic manipulation on what the field is being compared to.  There are a number of cludges for the arithmetic manipulation part,  mostly including a calculated field and comparing that to current date and they usually work but they’re inelegant and can be a maintenence nightmare.
  • Nested groupings in filters and list comparisons (IN and NOT IN) in filters and increase maximum filter size.  Currently it is only possible have one level of grouping, you can’t have a group within a group.  A number of times we’ve run into situations where we have to have a filter which implements something like “(((field1=P1 OR field1=P2 OR field1=P3) AND field2 > [Current Date]) OR ((field1=P1 OR field1=P2 OR field1=P3) AND field2 is null AND (field3 < [CurrentDate] OR field4 = ‘TBC’))) AND field5 not equals ‘CLOSED'” where P1, P2 and P3 are parameters passed in from the URL or another part of the page.  This, as can be seen, requires nexted grouping and is quite large, easily blows the maximum filter size.  Adding in list comparison operators would shrink it somewhat (“field1=P1 OR field1=P2 OR field1=P3” would become “field1 IN (P1,P2,P3)”) and if array processing was implemented would allow the option of parameter lists of arbitary size to be processed by passing a one dimensional array as the parameter.

An example of a customer request that would use many of these is:

On the 15th of each month after close of business (20:00) read the risk register.  Identify all risks which have not been updated in the past 30 days and the assignees and owners of those risks.  Send each risk assignee one email listing each risk they are assigned to that has not been updated in the past 30 days telling them to update them with actions taken since the last update within 5 working days.  Send each risk owner one email listing each risk they own that has not been updated in the past 30 days, identifying the assignee of each risk, asking them to ensure that the assignee updates the risk  within 5 working days.

With access to the backend database this is probably not too hard to do programmatically, but it can’t be done from within Sharepoint and SPD right now.

Written by stephenboothuk

September 2, 2011 at 4:35 pm

Posted in Uncategorized

Dataview displays on page but cannot select fields in filter dialogue

leave a comment »

Hit a bit of a wierd problem in Sharepoint 2010.  Created an ASPX page in Sharepoint Designer 2010 then inserted a couple of dataviews on different lists (Risks and Tasks).  The page is supposed to be a kind of My Risks/Tasks page so we need to put a filter on the dataviews for basically Owner = [CurrentUser].  The tasks list can build the filter no problems, the fields are there in the filter dialogue.  Click, click, click, done.  When I try to do the same to the Risks, however, the fields do not appear in the drop down.  Add/Remove columns works fine,  sort and group works fine.  It’s just filter.  I’ve tried a Google search but nothing promising has appeared so far.

The only difference between the risks list and the many others I’ve added filters to in the past is that this one was created from a template saved from a different site in the same farm then customised, others were created from scratch or were standard lists that sharepoint creates from the site template (e.g. the Tasks list).  Not sure why that would stop the filter dialogue working properly but it’s the only thing that comes to mind.

This isn’t the first problem we’ve had with creasting lists from a template (although the other is maybe more explicable).  If you save a list as a template and then create a new list on a different site with the template almost all of the fields recreate OK.  Any lookup on a custom list will create but even if that list exists on the new site the field will not be connected to the parent list.  I see the solution to this to be when you export a list Sharepoint should give you an option to include any parent lists for lookup fields then when you create the list from the template it gives you the option to create the parent lists (if they were included) or to select existing lists and attach them to fields.

Written by stephenboothuk

August 31, 2011 at 12:36 pm

Posted in Uncategorized

Speeches I Would Have Given

What I would have said at conference

Mark Vale

Tech blog on Microsoft Teams & Stuff

David Hunt, PE... Mechanical Engineer on the loose!

VALUE = Creativity + Diverse Experience + Critical Thinking


A personal blog about having Asperger's

Marc D Anderson's Blog

A Knowledge Management Zealot Speaks Out

Codeless Solutions for SharePoint

Bryon Wyly is a SharePoint Developer dedicated to finding the limits to out-of the-box SharePoint solutions

the political blog of gordon lyew

SharePoint Business Analyst

Just another weblog