Category Archives: SharePoint 2010

People unable to access documents you’ve uploaded to a Document Library

One of my business customers reported a strange issue. He had two document libraries where there were documents that he could see, but no one else could. I went in, expecting that I could see them since I had administrator access.  There were invisible for me also. Strange…

After doing some research, I found it had to do with uploaded documents that were missing required fields:

http://www.networkworld.com/community/node/33900

Here’s part of the post with the important parts noted:

Here’s the scenario: we have a new SharePoint site with a document library where there are several required columns and one of those fields is a Person field so therefore, it can’t have a default value.  A user uploads multiple documents to the library for the first time and since at least one required column value is missing, all of the new documents enter in a checked out state.  Note that the option to require check out is not enabled.  I’m the Site Collection Administrator and the user tells me that she’s uploaded several documents and wants to be sure she did it correctly so she asks me to check.

 I open the document library and see no documents in the default view I know they are there because we are sitting next to each other at a conference table and I can clearly see all 5 documents in her view on her laptop.  Since I’m the all knowing, all powerful Site Collection Administrator, I would assume that I could see her documents, even if they are checked out to her.  But, guess what?  I can’t.  At least not until I navigate to Document Library Settings, Managed Checked Out Files.  The only way I can see these documents in a list view is if I assume control of the documents and transfer ownership to me.  When I do that, I get to see the documents but, of course, now the user who uploaded them can’t see them until I enter the required column values and check them in.  I tried the same scenario logging in with a System Account, which should trump the Site Collection Admin in terms of privileges, and even the System Account can’t see the documents without digging in to the List Settings for the Document Library.  So, Microsoft, “what were you thinking?”

The problem is that there were two required fields in his document library. When he first uploaded the documents, those required fields were missing. As such, they loaded to the library, but they were in a checked-out state to where only he could see them. If he went into the documents, added the required fields, and then checked in the documents, they were viewable by everyone.

When I’m trying to send an email from a People Picker field value…

This is definitely a “for my own rememory” file…

Occasionally I’ll have a form customized with InfoPath, and it will contain a rule that tries to send an email based on a person’s name entered via a People Picker field. Just dropping the Display Name or the AccountID value doesn’t work to get the mail properly addressed. The following *does* work, however:

concat(substring(AccountId, 8, 6), “@contoso.com“)

The value in our AccountId field starting in position 8 for a length of 6 characters will work for an email name if followed by the @domain name.

This means more to me than it will to any reader, but it’ll save me from having to try and find an example of where I used that rule to make it work…

Fixing the “InfoPath cannot open the following file: xxxxxx The parameter is incorrect” problem…

My SharePointBuddy (SPB) recently ran into an issue on an InfoPath form she was working on. Someone went in to try and update the form, and they received the following error:

20130904Image01

 

This wasn’t a form we wanted to recreate from scratch, yet most attempts to fix it weren’t giving the results we needed.

SPB finally found the answer located at http://social.msdn.microsoft.com/Forums/sharepoint/en-US/f0555e7c-5ba0-40bc-82b8-89b2899f20a6/cannot-open-info-path-file-from-sharepoint

She had the customer take the following steps:

  • Go to C:\users\username\Appdata\local\Microsoft\
  • Create a backup of the folder “InfoPath” then delete the contents of the original “InfoPath” folder.
  • Next, go to C:\users\username\Appdata\Roaming\Microsoft\
  • Create a backup of the “InfoPath” folder and then delete the contents of the original “InfoPath” folder

Voilà! The problem was fixed and everyone was happy.

How to delete Document Library folders that are “locked” or “checked out”…

I got a help desk case where the customer was trying to delete a folder from a document library. But every time she tried it, she got the error message below. I tried to delete it and got the same result. It didn’t matter if it was through the browser interface, the Explorer interface, or SharePoint Designer. No go…

20130827Image01

I found the answer in the blog entry below:

http://moss-arvit.blogspot.co.uk/2011/09/sharepoint-2010-file-is-currently.html

Apparently it’s an issue of there still being documents in the library that have not yet had a major version published. To the person trying to delete the folder, it looks empty.  What you need to do is go into the Library Settings and take ownership of the files. You can then delete the entries, and after that the folder can be deleted.

Library Tools > Library > Library Settings > Permissions and Management > Manage files which have no checked in version:

20130827Image02

20130827Image03

20130827Image04

20130827Image05

Hopefully that will save you a bit of time if you run into the same situation…

Getting line breaks in a multi-line field customized by InfoPath…

I’ve been working on a site, and one of the fields in the list is a multi-line text box that collects concatenated values from entries on other fields. The underlying core of the site is that this is a custom list that I’m customizing with InfoPath.

I had been putting the different field concatenations one after the other, separated by semicolons. But ideally, it would be nice to have each set on a separate line.

My SharePointBuddy pointed me in the direction of this post: http://blogs.msdn.com/b/infopath/archive/2005/03/04/385577.aspx

It didn’t seem to work for me, but there was a comment in there that talked about actually copying and pasting a line break character in the concat statement in the rule. By creating a WordPad document that has two lines of content, you can copy the end of the first line and get the invisible line break character. Then when you paste it into the concat statement, you get your line breaks in the field!

Here’s how it looks in the rule:

20130826Image003

The line break in the concat statement isn’t a manual line break I put in there. It’s the effect of pasting in the line break character from the WordPad document. I also put some notes to that effect in a hidden section above the field so that future programmers wouldn’t “fix” the layout of that statement.

Before, here’s what my field looked like:

20130825Image001

With the linebreak copied in there, we now have this:

20130825Image002

MUCH better!

Need to modify the width of a SharePoint column in a view? jQuery!

I recently had a request on one of my sites to increase the size of the Description column in the SharePoint views. Out of the box, there’s no easy way to do that. But, with a little snippet of jQuery placed in a Content Editor Web Part on the page with the view, you can easily change any of the column widths…

Here’s the code I used:

<!--ADJUST TABLE COLUMN WIDTH-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript">
</script>
<script type="text/javascript">
$(function(){
$("div.ms-vh-div:contains('Description')").css("width", "350px");});</script>

If you have multiple columns to modify, just repeat the line with the “div.” string. This is so simple, my customer went in and made her own changes to the code.

Many thanks to Mark Miller, who provided the solution in the post SharePoint jQuery: Setting View Column Width.

 

How do sites in the My Sites Memberships list get there? And what if one is missing?

This was an interesting puzzle yesterday…

I get a customer help desk case about the Memberships list in her My Site page. She is the owner of a site that I set up for her, but it doesn’t show up on her My Site page. I really don’t use that feature, so I started digging around.

My thought was that I could just tell her how to add it manually. Um, no… Seems to be no way to do that through the UI. So if they get out there automatically, how does that work and why is her site not on there if she’s the owner.

I found my answer here: http://www.uccorner.com/183/sharepoint/memberships-in-sharepoint-2010-user-profile/

The Memberships list is driven by being listed in the *Members* group of the site in question. It doesn’t matter if you’re in the Owners group, the Visitors group, or listed individually. If you’re in the Members group for a site, that site will show up in your My Sites list. If not, it won’t.

To fix this, I added her to the Members group (she was already in the Owners group) and waited for the timer job to run. Once it did, her site was out there.

This is now recorded here for my “external brain usage” (and hopefully for anyone else confused like I was).

When the Content Query Web Part doesn’t show up…

I ran into an issue where a customer reported that she couldn’t find the Content Query web part (CQWP) in her list of Content Rollup web parts. After a bit of research, I found that the CQWP only appears if you have the SharePoint Server Publishing Infrastructure site collection feature activated.

Once I activated that, the web part appeared as it should. Noted here as I’m sure I’ll forget the next time this happens a year down the road…

So you *can* add an icon to a list item drop-down menu entry…

Back on September 1st of 2012, I blogged an entry about adding a custom entry to a list item drop-down menu (so I’d remember it next time I wanted to use it). It came out looking something like this:

20130519Image01

Just a couple weeks or so ago, someone commented and asked if you could add an icon to that entry. Now, looking at the default entries that SharePoint adds, the answer should be “yes”, but I didn’t know how to do it. But just this last week, my SharePoint Buddy showed me something she had discovered… how to add an icon! It was a case of both of us not scrolling down further on the screen to see the option for adding it.

To add the icon, you need to have a 16×16 pixel image for the menu. If you want to add a graphic to the Ribbon bar, it needs to be 32×32.

20130519Image02

Add the graphics to a library in your site, such as an Image or an Asset library:

20130519Image03

In SharePoint Designer, go into the Custom Actions area of the list where the custom action is added:

20130519Image04

Here’s where I originally failed to see how to add the graphic. When you look at the Create Custom Action dialog box, the screen only scrolled down as far as the Navigate To URL entry.  If I would have scrolled down further (I honestly didn’t even notice the scroll bar… D’oh!), I would have seen where the icon could be added:

20130519Image05

I browsed to the library where the image was stored, and voilà… I have an icon!

If you want to borrow the email icons for your own use, here they are:

20130519Image06

 

20130519Image07

 

A Way To Have Surveys Launch Directly To The Questions…

I recently had a customer ask me if there was some way to set up SharePoint surveys to go directly to the questions instead of going to the “home page” of the particular survey. While researching a different question, I happened to run into this link that gave me the solution to that question:

http://techtrainingnotes.blogspot.com/2010/12/sharepoint-modifying-respond-to-this.html

Here’s the summary of the article…

If you want to launch the survey directly, have the URL go to the NewForm.aspx page. To have it go to a different page when finished, use the ?Source= parameter to put the URL of the page it should go to when done.

Here’s an example of how I could launch the customer’s survey directly into the question, and then send it back to the news page:

http://domain.com/news/Lists/HealthChallenge/NewForm.aspx?Source=http://domain.com/news/Pages/default.aspx

http://domain.com/news/Lists/HealthChallenge/NewForm.aspx is the part of the URL that goes to the survey and launches a new survey response.

 ?Source=http://domain.com/news/Pages/default.aspx is the part of the URL that sends the browser to a different page once the survey response is submitted.

I figured I needed to put this out here so I’d remember the format the next time I have to tell a customer about this. 🙂