Posts

Synch User Fields when copying lists from one sitecollection to another

If you copy a list from one sitecollection to another one with a list template and the copied list has user fields than you'll have other users in the destionation list. This occures because SharePoint saves all user in a own UserInfo table for each sitecollection. A user in SiteCollection 1 can have the ID 5 and in another the ID 3. As the SPUserField is a LookUp Field to the User Info List the name of the User in the destination list can change. Two little PowerShell Scripts can help here. The first one reads the user info for a field in the source list and creates a csv with the information. The second one reads the csv and updates the destination list. Copy the code to two .ps1 files. Open the SharePoint 2010 Management Shell and run the "Dump user Info" script to dump the infos to a .csv file. Afterwards run the second script to update the destination list. Dump User Info # Adapt these values $web = Get-SPWeb "http://sharepoint/sites/sourcelis...

Copy SharePoint Lists between sites with different language templates

Image
An easy way to copy a list with content between to sites is to create a list template, upload it in the other site to the list template gallery and create a new list with the uploaded template. The problem starts when the site templates have different languages. For example you create a list template in a site with english site template and you upload it to a site with a german site template, you'll not see the template in the create page. A way to change this ist to modify the.stp file, which is created when you make the list template. SO the first steps are: Create a list template. You can do this in the list settings. Just click "Save list as template" and give in the the filename and the template name. Download the created template to a local folder. Extract the template file Now we will modify the .stp file. An .stp file is nothing more than a microsoft cabinet file. Therefore rename the file from "mylist. stp " to "mylist. cab "....

Item-Level Permission for a SharePoint Document Library

The SharePoint Document Library doesn't have the option in his UI-Settings to change the item-level permisssions like normal SharePoint lists. This means that you can't create a document library in which only user who created the documents can only see their documents and no one else. You can simulate the behaviour by changing the permissions on each single document but this could be expensive and could also cause performance issues on  large libraries. The better option is the activate the item level security by PowerShell. It seems that Microsoft  only disabled the UI Option but with PowerShell you can reactivate it. I don't know why Microsoft disabled this option but in my tests this method worked very well. $web = Get-SPWeb http://YourSite/ $list = $web.Lists["Your Document Library Name"] $list.ReadSecurity = 2 $list.Update() $web.Dispose() What the values for ReadSecurity property means can be seen here . There is also a property ...

SharePoint 2010 Search Wrong Sort Order by Title

We newly realized that the SharePoint Search has a strage effect when you sort the results by title. We have a custom java application, which uses the SharePoint search web service to query  and display search result from a non SharePoint Site. When we order the search by title with the expression "Order by" either in keyword or sql syntax  we have results like that: a aa aaa b ba bc bd tt z ac  ' Search starts new order ad cd fg The first 50 results are ordered, than the next 50 and so on. After digging a while and contacting the MS support we found out that this is a SharePoint bug with multiple indexes. If you have multiple indexes in your search application you'll get this result. Solution The MS Support said that the bugfix we'll be delivered with the CU April 2012. Another result is to create a second search service application with one index. Than you can assign this service to a custom webapplication which you can create specia...

Get Username in Nintex Workflow 2010

Image
If you select a user list field to be displayed in Nintex E-Mails you usually get the user login, like "domain/cmasters". If you want to display the full name of a user, you can use the "Search User Profile" Action in the "Integration" tab. Search User Profile When you configure the action, you can select the user list field from the item to be saved in a text variable. You can also select which profile property to read and to be saved in the variable. Configure Action Now you can use the variable in all other actions.

Display Name in SharePoint is out of synch

In some SharePoint installations there is often a problem with display names of users. As an example: The display name of a user in an organization consists of his firstname surname and orginizational unit like: Betty Looser (RD/F) If Betty gets married and changes her unit, SharePoint should show her new name and unit Betty Winner (FR/I) but it displays still the old one. More worse in some sitecollections the name is displayed correctly whereas in others not. Why is this happening ? This happens because SharePoint stores all user, which were ever logged in a site collection in a special database table " UserInfo Table ". This information is stored for every site collection. The contents of this table are displayed by a hidden SharePoint list called "User Information List". If you are a SharePoint admin, you can display the list information by typing the following url: http://{sitecollection url}/_catalogs/users/simple.apx When you first visit a...

SharePoint List Synchronization with Excel

Image
A question which is often asked is how you can synchronize a SharePoint list with Excel. The answer differs on what version of Excel you use. Excel 2003 with SharePoint 2007/2010 With Excel 2003 the synchronization works in both directions. This means that you can create a SharePoint list connect to Excel, make changes in Excel and write back to Excel. The single restriction is that you can't create new items in Excel but modify existing ones. Excel 2003 has a bug in which an alert pops up and says that the field is read-only, when you try to modify a field. There is a patch for this bug found here:  http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=952608 To synch the lists go to the list you want to synch and click on "Export to Excel" button in the ribbon. The list will be opened in Excel and automatically connected to the SharePoint list. Now you can make changes within the Excel sheet. To synch back click on "Data" >> "List...