Posts

Showing posts from January, 2012

Create Summary view of SQL Datatable

Combine two rows into one row with same ID Go through the following SQL table named [EmployeeSales] . Think that you have to create a summary table of monthly sales against each employee ID.  EmpID Year Month Sales 0001 2012 May 0.5 0001 2012 June 0.8 0001 2012 July 0.7 0002 2012 May 1.1 0002 2012 June 0.9 0003 2012 May 0.4 0003 2012 June 0.5 0003 2012 July 0.5 [EmployeeSales]  Table For that You can write a SQL query as follows. In that Query I have filter sales records relate to year 2012 and sord according to EmpID .  SELECT  EmpID ,   MAX ( CASE   WHEN  [Month]  =   'May'  THEN  [Sales]  ELSE   NULL   END )   AS  [May] ,   MAX ( CASE   WHEN  [Month]  =   'June...

SharePoint 2010: Customize SharePoint Add/Edit/Display Form

Image
When you create a SharePoint list the default SharePoint add/edit/display form get its looks by its own. For example the fields appears in the add/edit/display form based on the sequence you added the fields. Also by default all fields of the list are shown in the forms. Sometimes you may need to give a hand to customized that look and feel. I’ll try to give some light on how you can customize the default add/edit/view form of SharePoint list. Enable Content type Management First To customize the List forms you need to enable ‘content type management’. You can do so from List settings Page and then click ‘Advance Settings’. Then select yes for “Allow management of content types” as shown below: Figure 1: Enable content type management. Once you have enabled the content type for a list you will find a available content types associated with the lists under ‘content types’ section of list settings page as shown below: Figure 2: Content type management section in list settings...

SharePoint 2010: Approve/Reject dialog customization, show changed values

Image
SharePoint provide rich support for approval process. You can maintain version of changes, you can use built-in workflows or develop your own for approval process. You can even create custom workflow activities and use it in SharePoint Designer to create your own approval workflow. Unfortunately, SharePoint doesn’t provide a nice UI where approver can get a snapshot of what’s changes he’s going to approve/reject.  What we are familiar with the following UI: Figure 1: Very generic UI to approve/reject What if we could have a dialog as shown below: Figure 2: Custom Approve/Reject dialog with modification highlighted As shown in figure 2, the approver will have the better look of what’s the changes he’ll approve/reject. As shown in figure 2, the person who will approve/reject, can get a snapshot of what changes are waiting for his/her approval. What’s the cost of custom approve/reject dialog? Now the question comes what’s the development cost of such a custom approve/rej...

SharePoint 2010 Slideshow out-of-the-box webpart

Image
An easy to use out-of-the-box webpart, for creating a slideshow, was missing in SharePoint 2007 but don’t worry SharePoint 2010 is here. The webpart is easy to use. You have to create a picture library and upload some pictures. You can also create view that you want to show in the webpart. Click on the  ‘Edit hero button’  and the site opens in edit mode. Click on  ‘Insert’  and  ‘Web Part’ . Go to the category  ‘Media and Content’  and select the slideshow webpart. The settings of the webpart looks like this: You can choose from the following settings: Duration to Show Picture (seconds) The amount of seconds before a new picture will appear. Picture library Select the picture library that you want to use. Library view Select the view that you want to use. Picture Display Mode Do you want to show the pictures in random or sequential order? Display with The pictures can be shown with the title and description. Show toolbar A too...

How to upload a browser-enabled InfoPath form template to SharePoint

I was trying to upload an InfoPath form to a SharePoint server, when I got this error message when trying to verify the form: "This form template has not been correctly published to be browser-enabled. Open the form template in InfoPath Design mode, and click Publish Form Template in the Design Tasks task pane. Follow the steps in the Publishing Wizard to republish the form template, and then try again." If you're like me and don't have that much InfoPath experience, you'll probably be stuck for a few minutes. So I made this list of steps (using Office 2010) with what you need to do in order to publish an InfoPath form to a SharePoint server: Open the InfoPath form in Design mode (right-click the file and choose Design). In InfoPath, go to File > Publish > Publish form to a SharePoint Library. Type the URL of the site and press Next. Make sure Enable this form to be filled out by using a browser is checked. Choose Administrator-approved form temp...

SharePoint Online

Image
SharePoint Online Share documents and information ​SharePoint Online makes the power of the cloud work for your business. As part of Office 365, SharePoint Online lets you create sites to share your documents and information, making it easy to work together with colleagues and customers. Office 365 Features & Benefits Explore the features and benefits of Office 365, and stay up-to-date on the latest Office 365 information and buzz. Check out the Office 365 site. Try Office 365 Now ​Explore the new features of Exchange Online, SharePoint Online, Lync Online and Office Web Apps. Try it now

Copying/Moving SharePoint 2010 Designer Workflows

Most often, we required moving or copying a workflow that is created using SharePoint designer between sites or site collections. This was straight forward in SharePoint Designer 2007. You just need to copy the content of the workflow’s config(workflow.xoml.wfconfig.xml) file and the rules file & replaced the list GUID’s. But in SharePoint Designer 2010, there is a little tweak associated with it. There was an option in SharePoint Designer,  Export to Visio  which exports your workflow as a .vwi file, and can be imported in to another site using the option  Import from Visio .  But when you try that option, you will get the below message. This workflow cannot be imported because it was created in SharePoint Designer for a different site, or the original workflow has been moved or deleted. To move a workflow between sites, use Save as Template (.wsp file) instead of a Visio workflow drawing. So, to achieve the same follow the steps below.  In the fi...

Error with iLove SharePoint - Lookup Field with Picker

iLove SharePoint - Lookup Field with Picker.. http://ilovesharepoint.codeplex.com/ Error :  "Only PickerDialog types can be used with the dialog. The type should be configured as a safecontrol in this site." To solve this problem I have add following safecontrol statement to the web.config file. STEP 1 Go to : C:\Inetpub\wwwroot\wss\VirtualDirectories\ STEP 2 Open the "web.config" file and find the place which  safecontrol  tag starts. STEP 3 Add the following statement within  safecontrol  Tags SafeControl Assembly="iLoveSharePoint.Fields.LookupFieldWithPicker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c8ecfa5d637948fe" Namespace="iLoveSharePoint.Fields" TypeName="*" Safe="True" *  add "<" at the start of the above statement and add "/>" at the end of the statement