Archive for the 'SharePoint Designer' Category

11
Feb
15

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.

image

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

image

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

image

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

image

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

image

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.

image

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

image

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.

image

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

image

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

image

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

image

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

image

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

image

Insert an Update List Item action.

image

Here you can set each field to your variable values.

image

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

image

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

image

19
May
14

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."

image

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.

image

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!

05
Feb
14

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).

image

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

image

You can find the datasource in the _fpdatasources folder.

image

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!

image

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. 

image

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

image

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.

image

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.

image

 

 

References:

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.

06
Mar
13

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).

image

You insert the custom list form like this.

image

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

image

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

image

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

image

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.

image

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

image

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.

image

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

image

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

image

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

image

30
Jul
12

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?”

image

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. 

image

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).

image

08
Sep
11

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.

image

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!

04
Aug
11

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.

http://blogs.msdn.com/b/joshuag/archive/2007/12/04/edit-in-datasheet-locks-or-freezes-internet-explorer.aspx

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

http://tomblog.insomniacminds.com/2008/07/23/sharepoint-branding-issues-edit-in-datasheet-view/




Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

April 2015
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
27282930  
Support Wikipedia

Follow

Get every new post delivered to your Inbox.