Archive for the 'SharePoint Designer' Category


Updating a SharePoint List with Login Name, Email Address, Display Name and User ID with a 2010 Workflow

Here’s the situation.  You have an email address and you want to display the login name (domain\username), display name (Russell Wright) and perhaps the user ID from the SharePoint user list.  Here are the steps to accomplish with a SharePoint Designer 2010 workflow.

We start by creating a custom list and add the following fields.


The main field is Email PP (email people-picker) that we will populate with an email address.


Using the people-picker for an email address can be problematic if you have multiple user IDs with the same email address.


However, you should be able to select the correct one you want to use.


If you pick an email address that is related to a single AD account, you shouldn’t have this issue.


You’ll notice the workflow named Set Fields executed and populated several other fields.  See the Completed link under the Set Fields column?  This link will take you to the workflow history list.  Let’s see how this is done in the workflow.

We’ll start with a simple list workflow created on our custom list.  The start options are set as shown.


Begin by creating all the variables you’ll need.  We will create string variables for each attribute we are dealing with.


Using the action Set Workflow Variable, we’ll read the Email PP field and set a variable for each variation of the field we want to set in a text field.  In this example we create the variable named LoginName and set its type to string.


We then set its value to Email PP from the Current Item.  The important thing is to return the field as Login Name.


Repeat this process for each variant of the people-picker field you want.


As a matter of good practice, log the fields to the workflow history list so you have a record of what they look like.


This action will give you an entry in the workflow history that will display the values of your variables.


Now, on to the step to set the fields in the list, using Update List Item.


Insert an Update List Item action.


Here you can set each field to your variable values.


Here is an example of setting the LoginName Text field with the LoginName variable.


And the final result should display multiple attributes of the person in the people-picker field.



Create MS Access View Missing after Installing Hotfix KB2553170

Windows 7 SP1, Office 2010, accessing SharePoint 2013 on both Office 365 and on-premises.

You might find you have an issue when attempting to create an Access view from SharePoint 2013.  In this case I was getting an error when I clicked on Access View, "Export to database failed. To export a list, you must have a Microsoft SharePoint Foundation-compatible application."


I found an article where this error was being discussed.  There was a hotfix issued in December 2013 that addressed the issue.  However, after installing the hotfix, I found the Access View link on the create view page was missing.  This required performing an Office 2010 repair (from Programs and Features) by selecting Change on Office 2010.


After doing this and rebooting, the link was back…and it worked!  This is the 2nd time in the last week I’ve had to perform an Office 2010 repair.  I think it all started when I installed SharePoint Designer 2013 on this machine (it already has SPD2007 and SPD2010).

Hey Microsoft, stop breaking your software!


Deleting List or Library Fields Breaks Data View Web Part in SharePoint 2007

Okay, I know this is OLD 2007, but some folks are still running it!

This is actually a two-part fix. 

  1. Fix the data source so it isn’t referencing the deleted fields
  2. Fix the web part so it isn’t referencing deleted fields from the data source

Here’s the web part that is showing an error because field(s) were deleted from the underlying list (library).


The data source will not return any data because it is also messed up due to the deleted list fields.


You can find the datasource in the _fpdatasources folder.


Then you can edit it in XML or Text mode.  You probably need to check it out first, or you won’t be able to save it!


Fix the data source.  This involves finding the field in the data source XML that has been deleted.  In this example, we have found <FieldRef Name="Scorecard"> that has been encoded (e.g. &lt;).  Delete it, and be sure you get all the correct text deleted. 


Now you can see the data in the data source once again!


You need to fix the web part by finding the extra field(s) that are being referenced and remove them from the data source reference.


In the code view, find the <DataSources> tag and you can then locate the <datafields> section where the deleted list fields are still present.  You need to remove them as shown above.





The server returned a non-specific error when trying to get data from the data source.  Check the format and content of your query and try again.  If the problem persists, contact the server administrator.


Reordering and Hiding Fields and Passing URL Parameters on a New Item Form in SharePoint 2010

Let’s say you are creating a new item form using SPD 2010 and you don’t have InfoPath because the company didn’t purchase the Enterprise version of SharePoint.  Your goal is to pass a URL parameter to the new item form from some other part of the SharePoint application you are building.  Perhaps the link that contains the URL parameter was created by a workflow (hint hint).


You insert the custom list form like this.


The goal is to move this field down to the end of the form to get it out of the way.


You select the row and cut it for repositioning to the end of the form.


Now you’ve got it at the bottom of your form.


Now you test your form (before adding the parameter to pass) and it "works" but it doesn’t correctly save the data in the field you relocated.

The correct way to do this is to delete the field row at the top, add a new row at the bottom and insert a new text field and bind it to the column.


Bind the Data field to the column and format it as a Text Box.


Under Options, select Parameters and add a New Parameter, giving it a name that is memorable for you.  Then, bind it to the Query String variable of your choice.


With your text box selected, find the text property and change it from @Fieldname to $Parametername.


If you don’t get the name correct, you’ll see an error displayed instead of your form.


If you want to hide the field completely on the form to eliminate any human intervention, add class=ms-hidden to the table row.



Mystery Meat Navigation in SharePoint Designer 2010

One of my favorite topics is how Microsoft have forgotten to design user interfaces over the years, even though they published some books early on which defined the correct way to create a UI.

When I really feel “in the mood,” I go back and browse Vincent Flanders’ Web Pages That Suck site.  I’m constantly reminded from MS about some of their stupid interface design, usually executed for the sake of marketing flair, is not necessarily confined only to web UIs.  It’s prevalent throughout all their products, if one simply looks for five minutes.

Here’s one that always gets me, and it’s possible I’ve written about it in the past. 

This is an innocent tool ribbon (don’t get me started…) in SPD 2010 that has three items in a group called Manage, that don’t operate the same.  Can you tell, “which one of these things is not like the others…which one of these things just doesn’t belong?”


I’ll give you a hint.  It’s the one in the middle, which is an action button, while the ones on the outside are push buttons. 


This is what happens when programmers grow up without the benefit of ever having used a pushbutton car radio (not exactly, but you get the point).



SharePOint Designer 2010 Workflows Still Process Out of Order

One of the issues with SharePoint 2007 workflows was the actions within a workflow could process out of order due to the asynchronous nature of the workflow processing.  In order to work around these “race” conditions you had to put a checkpoint or commit in your workflow.  This usually means you put a pause in your workflow to make the workflow serialize and de-serialize in the database, thus causing a commit to occur.

The same issue exists with SharePoint Designer 2010 workflows.  I just had an “update list item” action update the incorrect list item, even though it was specified with a unique key.  In many of my workflows I create a name/value pair list that stores values I need to pass around.  In this case I had a “LastMonthProcessed” entry and a “MonthlyControlsListURL” entry.  Each time I updated the “MonthlyControlsListURL” key the value would end up in the “LastMonthProcessed.”  After putting a 1 minute delay (pause for duration) action after the update of the “LastMonthProcessed,” all of the updates occurred correctly.


You’d think some clever MS programmer would fix this issue once and for all…or they would a least give you a commit action in SPD.  Arghhhhh!


Data sheet view freezes Internet Explorer in SharePoint 2007

I ran across this today which is a very interesting problem that may be the underlying issue that a client is experiencing.  Here are a couple of helpful links on the subject.

This is an old post from Josh Gaffey, but some folks are still using the old-er stuff. 🙂


Conditional Formatting and date comparisons with SharePoint Designer 2010

So here’s a fun one that we at SharePoint Rx were struggling with the other day. 

We were creating a dashboard using the DVWP in SharePoint Designer 2010 and had to perform some date comparisons to control the display of indicators.  If you’ve used SPD in the past, you know that the goal is to NOT write code, but to use the “coding by clicking” capabilities of SPD and allow it to write the code (in this case XSL) to control your conditional formatting.  Every time I use SPD for something like this, I always seem to run into a new problem, even though I know it should be a simple task. 

“Am I the only one with this issue?” he asks.

Here’s the end goal…to display a status indicator for tasks to indicate whether they were completed on time, completed late, not complete and not late, and not complete and late.  You can see the four icons I chose to indicate these statuses. 


My “conditions” are as follows:

clip_image001 Status equals “completed” and Due Date >= Completed Date

clip_image002 Status equals “completed” and Due Date < Completed Date

clip_image003 Status not equals “completed” and Due Date >= [Current Date]

clip_image004 Status not equals “completed” and Due Date < [Current Date]

One of the issues you immediately experience is the comparison of date values.  Using SPD, I did an “un-advanced” comparison in my condition statements and never got the correct results.  SPD wrote some XSL like this (I broke it up so it’s a little easier to read):

<xsl:if test=”normalize-space($thisNode/@Status) = ‘Completed’


ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@DueDate))) &gt;=
normalize-space(@Completed_x0020_Date)” ddwrt:cf_explicit=”1″>

<img src=”_layouts/images/kpinormal-0.gif” width=”16″ height=”16″ />


So we have a “Due Date” that has been operated on by ddwrt:DateTimeTick (see if you can find any documentation on this function) and is returning the number of days from January 1, 1900 comparing to the “Completed Date” in the form “MM/DD/YYYY.”  That doesn’t work!

Sidebar rant…Come on, Microsoft!  The only documentation on the ddwrt namespace is from a non-MS person (Serge van den Oever ) and is from 2005…for SharePoint 2003?

So, let’s look at the “Advanced” condition criteria that does work.


We used the completely undocumented ddwrt:DateTimeTick function and applied it equally to both dates.


When performing the comparison with [Current Date], here’s what we did.


We were successful with using the $Today variable, but I’ve seen others who have also used ddwrt:Today.


Here are the criteria for all four conditions.

@Status = ‘Completed’ and ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@DueDate))) >= ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Completed_x0020_Date)))

@Status = ‘Completed’ and ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@DueDate))) < ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Completed_x0020_Date)))

$thisNode/@Status != ‘Completed’ and ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@DueDate))) >= ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today)))

$thisNode/@Status != ‘Completed’ and ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@DueDate))) < ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today)))

Now, I’d like to believe that features in SPD 2010 that were in SPD 2007 were all functioning correctly, but I seem to have lots of problems using the “All formatting visible” functionality.  I found that each time I changed this I must

  • Save the page
  • Press F5 to refresh (sometimes more than once)

Not sure what that’s about or if it’s just one of my settings, but it sure is annoying.


Of course, the idea is that you want to make all your conditionally formatted elements visible so you can easily work on them.


FYI, if you want to determine which condition applies to which element, you can select the condition and you should notice a highlighting of the element to which the condition corresponds. 



Conditional formatting

SharePoint Designer 2010

Date comparison

Data view web part

ddwrt namespace


Can’t Edit Page Layout in SharePoint Designer 2010

Are you having issues opening a page layout in SPD 2010 for editing?  Is everything highlighted in yellow?  John White has a good explanation of what your problem probably is.  You need to edit the file in Advanced Mode.  What’s Advanced Mode?  It’s opening the file so you can really edit it instead of opening it in a mode where you can’t edit it…even though you clicked on Edit File.  Perhaps it should be called "Really Edit the FIle"  (That was supposed to be tongue-in-cheek humor).

What’s interesting is sometimes you’ll be asked if you want to open the file in Advanced Mode and other times the file will open in "read only" (yellow) mode.  Call me old fashioned, but when I click Edit File, I intend to edit the file.


Right-click the file and select "Edit File in Advanced Mode."


Or, with the File Information screen displayed, select the Edit File drop-down and click on "Edit File in Advanced Mode." 


Either way, you’ll be able to edit the file, as you probably intended to do in the first place.


Search Keywords:

Can’t edit file in SharePoint Designer 2010

Can’t edit page layout in SharePoint Designer 2010

Page is locked for editing in SharePoint Designer 2010

After copying and pasting a page layout it can’t be edited

Edit File in Normal Mode vs. Edit File in Advanced Mode


SharePoint Designer 2007 and 2010 Co-habitating on the Same Computer

I’m wondering if others who have SPD 2007 and 2010 on the same client computer are seeing this happen each time 2007 is started.


Since you can’t use 2010 to edit 2007 sites, this seems like it’s going to be a pretty standard configuration on many people’s computers.  Especially for those of us supporting many clients!

Asif Rehmani’s SharePoint Videos


Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home


Posts by Date

March 2023
Support Wikipedia