Saturday, January 28, 2012

Survey- Number of Responses Mismatch

The Sitch:
You've created a survey in SP2007 (Which a lot of my clients are still using, btw.) You go to check the results and see the "Number of Responses" is ten (10). You go to look at the actual responses and you only see six (6). What gives?

The Issue:
First, let me tell you that this has been a known issue in SP2007. A user starts filling out a survey and they get interrupted. They save their survey in progress so they can come back and finish up later.* This partial response increments the "Number of Responses" counter but the display won't show the partial response itself- Not even to you, the owner. Only the person who saved it can see it. That's why the number of responses the survey says it has doesn't match up with the number of responses you're actually seeing.

The Solution:
What can you do about it? Darn little. This will happen in SP2007 whenever you give the user the option of saving and finishing later. So when does this happen? There are two scenarios I've noticed that trigger this:

  • Using page separators

  • Using branching logic

Branching Logic
Branching logic is something like "depending on the user's response to question "A" send them to question "B" or "C." A very useful feature for a survey. But, sometimes you just want to collect feedback and your survey doesn't need branching logic at all. In this case, just use a custom list and don't bother with the survey. You'll save yourself a lot of time and headache and you'll thank me later.

Page Separators
If you insist on using a survey where no branching logic is involved then make sure that all the questions appear on a single form. In other words, don't use page separators. Yes, they make the survey easier to take because the user isn't intimidated by a form that's sixteen feet long, but it's going to give them the option of saving and coming back later*, which is the cause of the whole problem in the first place.

*They NEVER do! They ALWAYS come back and try to start over. If you didn't make sure "Allow multiple responses?" was set to "No," then they'll be able to create as many partial responses as they like. If you did limit the responses to one-per-person then they'll get an error and email you about it.

BTW- MS has mananged to resolve this glitch in SP2010 as well as add a slew of great validation features (for a later post).

Sunday, January 15, 2012

Cannot read from the source file or disk

The Sitch:
Attempting to move documents from one SharePoint site to another sometimes results in a "Cannot read from the source file or disk" error. Why?

Cannot read from the source file or disk.
The Issue:
Explorer view uses WebDAV (Web Distributed Authoring and Versioning) for file functions like move and copy and WebDAV doesn't play nicely with SSL secured websites. If only one of the sites is using SSL then you should be ok. Take a look at the address of your source and destination sites- are they both using SSL?
The 's' indicates its a secured website.
(Hint: If you see an "s" to the right of "http" then the site is secured using SSL.)

If both sites are using SSL then you're going to have trouble "Moving" items using Explorer View. You can still do it. It just takes a little workaround.

A Workaround:
Instead of "Moving" items try "Copying" them. To do so, right-click (and hold) then drag the items you want to move. When you let go of the mouse button (in the destination window, of course) you will be asked "Are you sure you want to copy or move files to this folder?"

Are you sure you want to move or copy files to this folder?
Click "Yes." The next thing you're going to see is the dialog box asking what exactly you want to do: Copy Here, Move Here, Create Shortcuts Here, or Cancel. Choose "Copy Here" even though "Move Here" is bolded by default.

Choose 'Copy Here' not 'Move Here.'

All items should copy over without any trouble.

Granted, you'll have to manually delete all of the documents from the source library but that's not hard. And, you can do it in the already opened "Explorer View" for that folder. Just be sure you're deleting from the source and not the destination ;-)

Hope this helps!

CG

Tuesday, January 10, 2012

Attachments and Custom Forms using SharePoint Designer 2010

If you're going to customize forms in SPD 2010 (or SPD 2007 for that matter), be aware of a few things where attachments are concerned- When creating custom SharePoint forms via SPD (aspx, not InfoPath), many people only hide the original form by setting "isVisible" to "false" then adding a custom list form to the page. Setting isVisible to False.
If you do, you're likely to get a save conflict along the lines of "Failed to get value of the 'Attachments' column from the 'Attachments' field type control blah blah blah... "
Failed to get value of the 'Attachments' column from the 'Attachments' field type control.  See details in log. Exception message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)..


Some work arounds:


If you want to keep attachments enabled:
Delete the original form. Don't just hide it! Hiding it only keeps it from displaying though the browser. The Attachment control is still there and the two form's attachment controls will conflict with each other.


If you don't need attachments you could do either of the following:
Disable attachments before you create a custom form.
Disable attachments warning message.
This will make your life a lot easier. But it may not be feasible if you're asked as often as I am to make customized forms after someone else has created the list.
-OR-
Edit the attachment control and display in the XSLT. Comment out the "SharePoint:AttachmentUpload" control in the dvt_1 template.
Comment out SharePoint:Attachments control in XSLT
Then comment out the "Attachments" row in the XSLT as well. Just to be tidy. That's usually at the bottom of the dvt_1.rowedit template.
Commenting out Attachments row in XSLT
You should be good to go!

CG


Monday, January 2, 2012

Building Dynamic Strings in SharePoint Designer 2010

(In keeping with my New Year’s resolution, here’s my first post!)

As with a lot of things in SP2010, The Build Dynamic String action is still there but it's been changed a bit. I don’t know why but the actual WorkFlow action itself is hidden by default in SPD 2010.

The good news: You can enable the action but you’ll have to have access to the 14 folder and then do an iisreset. (see note at the end)

The BETTER news: You can use the Build Dynamic String action via the “Set workflow variable” action! (You just need to be aware of a little quirk).

Get Started!
Go ahead and open up SPD2010 and create a new WorkFlow. For example purposes, it doesn’t matter if it’s a list or site WF.

Now, choose “Set workflow variable” but don’t name the variable yet. Click the “value” link.

Set workflow variable but dont name it yet.

Notice anything missing?

Missing String Builder dialog button.

You don’t see the lookup String Builder dialog button (String Builder dialog button.). You can’t build a dynamic string without one.

I’ve found that this button won’t appear unless you’ve created or named the variable already.

Go ahead and click “workflow variable” to create a named variable. I like to prefix my variables with “str”, “num”, or “var” depending on what I’ll be using them for. In this case, “strMyDynString.”

Name the variable first.

Now when I click “value” the String Builder dialog button is there and I can start building my dynamic string.

If you first create the variable and name it, the String Builder dialog button will appear and you can build your dynamic string!

Note: If you’re interested in re-enabling the action itself, have a look at Greg Osimowicz’s blog post on it.

Best!

CG