When setting up a list view using a filter, I could not figure out the logic between ANDs and ORs. Finally found this great forum post that explains it very well.
Here is a short excerpt:
Because the boolean operators AND and OR have the same level of precedence, in order to achieve what you want you need to be able to group the expressions like so:
(Lead Writer = [Me] OR Created By = [Me]) AND (Status = Not Started OR Status = In progress)
However, when setting the filters using the UI, SharePoint adds the filters sequentially, so it will interpret this as something like
(((Lead Writer = [Me] OR Created By = [Me]) AND Status = Not Started) OR Status = In progress)
Thanks to Paul Lucas
Friday, June 29, 2012
Thursday, June 28, 2012
Text Box Double Click Issue
Environment
Thanks to this blogpost for the idea
- SharePoint 2010
- InfoPath 2010
- Web Form
- Form had several text boxes
- Client wanted OneNote type saving, where every time they change a text box, it saves the form
- I wanted a no-code solution, so it needed to be done using rules
- Idea was to add a submit rule to each text box
- Everytime they would type in a text box, it would take two clicks to get to the next text box
- They type into a text box, then click on the next text box, the form would post back and focus would not return to the text box on which they clicked, causing them to have to click again
- Turn off Post Back on the text box
- Edit the properties on the text box
- Click on the Browser Forms tab
- Select Never
- My initial thought is to use this sparingly.
Thanks to this blogpost for the idea
Wednesday, May 30, 2012
Limited Access Issue Continued
In a previous post, I talked about a user that had limited access to a folder within a document library, but no access to the library, nor the site, and the user was not able to access the folder despite being given access. Microsoft helped me solve that issue by disabling viewformpageslockdown.
However, the issue persisted on a couple of sites within the site collection, even though the site collection at large was fixed. The only commonality with the sites that were still having problems was that I had used Metalogix Migration tool to copy the entire site over to the new environment from SharePoint 2007 to 2010. Most of the other sites, I used the tool to copy data (i.e. lists and libraries), but not the entire site. I had setup the site on the new environment and copied information into it.
After a lot of frustrating poking around, I noticed this within permission levels for the site:
If you go to Site Permissions for the particular site, there is a Permission Levels button that takes you to permission levels for the individual site. I clicked Inherit Permission Levels and it fixed the problem for that site. After clicking that, the Permission Levels button disappeared for that site, now I can only access permission levels from the root site.
However, the issue persisted on a couple of sites within the site collection, even though the site collection at large was fixed. The only commonality with the sites that were still having problems was that I had used Metalogix Migration tool to copy the entire site over to the new environment from SharePoint 2007 to 2010. Most of the other sites, I used the tool to copy data (i.e. lists and libraries), but not the entire site. I had setup the site on the new environment and copied information into it.
After a lot of frustrating poking around, I noticed this within permission levels for the site:
Thursday, May 17, 2012
Profile Import Issues - Helpful Blog
Pictures weren't importing into SharePoint and I found this blog post to have some unique insights
http://blogs.technet.com/b/harmeetw/archive/2011/09/10/importing-thumbnail-photos-from-ad-active-directory-into-sharepoint-2010.aspx
This is an extract from the end of the blog:
Troubleshooting:
How to find if an image for a user has been imported in Sync DB
Select sAMAccountName,SPS_MV_OctetString_PictureURL from MMS_Metaverse Where SAMAccountName like '%UserName%'
How to find if an image for a user has been imported in Profile DB
Select NTname,PictureURL from UserProfile_full where NTName like ‘%UserName%’
We first import images from AD into Sync DB and then populate it into the Profile DB. By default images do not auto populate in Profile DB,we need to run the following CMDlet
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysite
Image type issues
Best way to troubleshoot this issue is by creating a simple JPG file from MSPaint and then upload it to the Active Directory, if this comes through then you will need to check out the file types or the size issues.
http://blogs.technet.com/b/harmeetw/archive/2011/09/10/importing-thumbnail-photos-from-ad-active-directory-into-sharepoint-2010.aspx
This is an extract from the end of the blog:
Troubleshooting:
How to find if an image for a user has been imported in Sync DB
Select sAMAccountName,SPS_MV_OctetString_PictureURL from MMS_Metaverse Where SAMAccountName like '%UserName%'
How to find if an image for a user has been imported in Profile DB
Select NTname,PictureURL from UserProfile_full where NTName like ‘%UserName%’
We first import images from AD into Sync DB and then populate it into the Profile DB. By default images do not auto populate in Profile DB,we need to run the following CMDlet
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysite
Image type issues
Best way to troubleshoot this issue is by creating a simple JPG file from MSPaint and then upload it to the Active Directory, if this comes through then you will need to check out the file types or the size issues.
Wednesday, May 16, 2012
Powershell - Creating a SharePoint Group w/Another Group as Owner
I wanted to create a SharePoint group on a site collection with:
$webName = "sitename"
$spWeb=$spSite.OpenWeb($webName)
[Microsoft.SharePoint.SPMember]$GroupOwner = $spWeb.SiteGroups["Group Name"]
$newGroup = $spWeb.SiteGroups.Add("Group Name", $GroupOwner, $null, "Description")
For reference, you could replace the $null with a user that you would like to be a part of the group
I think that's everything, I pulled everything I thought was necessary from a much larger script.
- No rights to any sites, just create the group
- A sharepoint group as the owner of the new group
- Done using Powershell
$webName = "sitename"
$spWeb=$spSite.OpenWeb($webName)
[Microsoft.SharePoint.SPMember]$GroupOwner = $spWeb.SiteGroups["Group Name"]
$newGroup = $spWeb.SiteGroups.Add("Group Name", $GroupOwner, $null, "Description")
For reference, you could replace the $null with a user that you would like to be a part of the group
I think that's everything, I pulled everything I thought was necessary from a much larger script.
Tuesday, May 15, 2012
InfoPath form Migration
I needed to move a bunch of InfoPath forms from one library to another, because
I re-created the infopath template on a new server. I needed to preserve the
historical data, however, the individual forms (XML Files) reference the old library, so I
needed to change all of the URLs in all of the XML files to point to the new
server. This script allowed me to do that.
$files = get-childitem .\ToDo
foreach ($file in $files){
(Get-Content c:\XmlFiles\ToDo\$file) |
Foreach-Object {$_ -replace "http://OldSiteCollection/Path/Forms/template.xsn", "http://NewSiteCollection.com/path/Forms/template.xsn"} |
Set-Content c:\XmlFiles\Done\$file
}
I copied all of the InfoPath forms to a directory (c:\XmlFiles\ToDo) on my computer and created an output directory (c:\XmlFiles\Done), then ran the script.
$files = get-childitem .\ToDo
foreach ($file in $files){
(Get-Content c:\XmlFiles\ToDo\$file) |
Foreach-Object {$_ -replace "http://OldSiteCollection/Path/Forms/template.xsn", "http://NewSiteCollection.com/path/Forms/template.xsn"} |
Set-Content c:\XmlFiles\Done\$file
}
I copied all of the InfoPath forms to a directory (c:\XmlFiles\ToDo) on my computer and created an output directory (c:\XmlFiles\Done), then ran the script.
Friday, April 13, 2012
Limited Access Not Working on Folders
Environment:
SharePoint 2010, no service pack installed
Scenario:
- There is a folder in a document library on a site.
- Bob does not have access to the site, nor the document library.
- I break inheritance to the folder and grant Bob access.
- Bob is then given a link to get to the folder in the document library.
- Bob opens the link and is told Access Denied
Troubleshooting:
- All logs give a standard access denied error
- Nothing shows up in the Event Viewer
- Works in other site collections in the same web app
- Exported trouble site collection and reimported into another web app, no luck
- Other mundane things that left me frustrated
Microsoft came to the rescue:
Microsoft Support gave me a lovely command to run:
- disable-spfeature -identity viewformpageslockdown -url http://sitecollection.com
Apparently this happens on site collections that are created based on the publishing template. My site collections that were based on the Team site template didn't have the problem
Subscribe to:
Posts (Atom)