Posts

Split string in 2 column

I have a field called "Location" in this field we are storing "City, State". Now we want to show city in other column and state in other column. Basically I want to split the "Location" column based on "," (comma). To achieve this goal I am using the functions: LEFT RIGHT SEARCH LEN IF ISERROR TRIM Let’s see how can we do this with use of above given functions. If Errors, I am using ISERROR formula =IF (ISERROR (currentFormula), "", currentFormula) I am going to create a calculated column called "City" and copy & paste the " =IF(ISERROR(LEFT(Location,(SEARCH(",",Location,1)-1))), "", TRIM(LEFT(Location,(SEARCH(",",Location,1)-1)))) " in the formula text box. This formula will check whether any error is coming or not if error is coming then it will return blank value otherwise show us "City Name" I am going to create a calculated colu

Remove user from site collection

Hi, If you want to remove or delete a user from site collection not from a site only what will you do in SharePoint 2010. We have option to delete a user from site collection In SharePoint 2007. But unfortunately in SharePoint 2010 we do not have this option.      ·          Now follow below given steps to remove or delete a user from whole site collection: ·          Log in as Site Collection Admin in site collection ·          Go to Site Actions & then Site Permissions ·          Hit on any security group to open. ·          Go to the URL now. You will find the url look like : o    http://[YourSiteURL]/_layouts/people.aspx?MembershipGroupId=[ANumber ] ·          Just make a change in this url o    http://[YourSiteURL]/_layouts/people.aspx?MembershipGroupId=0 ·          Just remove number [ANumber] from the URL & place “0” (Zero) instead of that number. ·          After deleting any user from here will be deleted from the whole site collection.

Exam Ref 70-332: Advanced Solutions of Microsoft SharePoint Server 2013

Hi, Prepare for Exam 70-332 - and help demonstrate your real-world mastery of  Microsoft   SharePoint   Server  2013. Designed for experienced IT Professionals ready to advance their status, Exam Ref focuses on the critical-thinking and decision-making acumen needed for success at the MCSE level. Download ebook for 70-332

Exam Ref 70-331: Core Solutions of Microsoft SharePoint Server 2013

Hi, Prepare for Exam 70-331 - and help demonstrate your real-world mastery of  Microsoft   SharePoint   Server  2013 core solutions. Designed for experienced IT professionals ready to advance their status, Exam Ref focuses on the critical-thinking and decision-making acumen needed for success at the MCSE level. Download free ebook for 70-331

My Sites Web Part

Image
Here people wanted to see a web part which can show my sites on which current user have access permission. I searched in SharePoint but I didn't find any out of the box web par for the same purpose. So created My Sites Web Part for our internal use. I have created 2 view of the web part with some different kind of settings: 1.    Show My Sites in Tree View 2.    Show My Sites in View Download My Sites Webpart Download Document

WSS_Logging database

Truncate WSS_Logging database with this script : 1. Open SQL Server with "Run as Administrator" 2. Right click on WSS_Logging database & click on New Query. 3. Copy & paste below given script.       DECLARE @TableName AS VARCHAR(MAX) DECLARE table_cursor CURSOR FOR SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME LIKE '%_Partition%' OPEN table_cursor FETCH NEXT FROM table_cursor INTO @TableName WHILE @@FETCH_STATUS = 0 BEGIN DECLARE @SQLText AS NVARCHAR(4000) SET @SQLText = 'TRUNCATE TABLE ' + @TableName EXEC sp_executeSQL @SQLText FETCH NEXT FROM table_cursor INTO @TableName END CLOSE table_cursor DEALLOCATE table_cursor 4. Run this query. 5. Than shrink this database.

PowerShell Command to Export Sub Site

Export site with these option. This will include all customizations, user securities, list & libraries etc. Export-SPWeb -Identity http://sharepoint-demo/IC -Path " c:\bkup\IC.cmp " -Force -IncludeUserSecurity -IncludeVersions All Note : ·          http://sharepoint-demo/IC : You can change this site url. Put url of site which is going to be backed up. ·          C:\backup\IC.cmp : You can change backup path with file name. You have to keep extention .cmp as it is. More information about “Export-SPWeb”

What is Managed Path in SharePoint

Let’s understand what is path first. In SharePoint you have seen some different types of site collection urls within same Web Application like : ·         http://sharepointDemo ·         http://sharepointDemo/subsite ·         http://sharePointDemo/Subsite/SubSubsite ·         http://SharePointDemo/Sites/Contoso ·         http://SharePointDemo/Sites/Contoso/SubSite These different kind of URL structure called path & you can manage these path as per you your organization hierarchy or architecture. Some time you required to create a site collection with name of “Departments” & under this “Department” you might want to create some departments like HR, IT etc. and you want your site collection url should be like http://SharePointDemo/Departments/HR . Managed path is this. Where you can manage site collection path not whole url. Here you can Manage Path for the selected Web Application. In other words, when you creates your first site collection in Web Application you have to provid

Update for Microsoft Project Server 2013 (KB2768001)

Applies: Project Server 2013; SharePoint Server 2013 Due to a change in the package configuration introduced after SharePoint 2013 RTM the March Public update is a mandatory requirement in order to install subsequent SharePoint Updates. Download from Microsoft

Get web.config file in timer job

I was working on timer job & wanted to get data from sql server. To achive this goal, I add my database connection string in web application’s web.config file. Now I used the following code to get web.config setting from timer job : private string getConnectionString()         {             return System.Configuration.ConfigurationManager.AppSettings["MyAppSettingKey"];        } But this code was not able to get the web.config file. Why? I started some R & D on it & found that Time Job runs under OWSTimer.exe & Web Application runs under W3WP.exe. As the context of  Both are different so we have to use WebConfigurationManager to get specific SharePoint Web Application configuration. private string getConnectionString(string webAppName)         {             System.Configuration.Configuration webConfiguration = WebConfigurationManager.OpenWebConfiguration("/", webAppName);             return webConfiguration.App