Skip to main content

Posts

Create Export to Excel option for list as button control in page

In Sharepoint 2010, in the list ribbon there is an option Export to Excel, to get the list data in excel format. The same option can be given to the end user on click of a button in the page Create a content editor webpart. In the html source enter the following code <button type="button"  <a href="#" onclick="javascript:window.location='../_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List= ListGuid &View= ViewGuid &CacheControl=1'"><img src="/_layouts/images/icxlsx.gif" border="0"/>&nbsp;&nbsp; Export to Excel</a> </button>

Calculated column tips

Calculated columns is one of the types available in SharePoint. Some important rules and guidelines are as follows: The functions TODAY and ME are not supported in calculated columns but are supported in the default value setting of a column. Arithmetic operators supported include + (addition), - (subtraction), * (multiplication),/ (division), % (percent), and ^ (exponentiation). In Equations parenthesis are allowed. The allowed Comparison operators are  = (equal to), > (greater than), < (less than),>= (greater than or equal to), <= (less than or equal to), and <> (not equal to). & (ampersand) is used to connect 2 values and produce one continuous text value. A value other than the current row cannot be referenced A value in another list or library cannot be referenced. The RAND and NOW functions is not supported in Lists and libraries. Most of the Excel functions are supported in SharePoint calculated columns, but not all.

Examples of utility function in SPD 2010 workflows

In SPD workflows, under Actions, there is a set of Utility functions. Using the substring function, a string can be trimmed from the beginning/end/or from a position, with or without specifying the length. An example, to remove the domain part from the user name, e.g. abcdomain/username, follow the below steps 1.        Use “Extract substring from the index of string” 2.        It would insert a step in WF as “Copy from string , starting at 0 (Output to Variable: substring ) 3.        Click on ‘string’ and click fx to get the field to be trimmed. 4.        It would bring the look-up window. 5.        Select the field and click OK. In this e.g., Data Source: Current Item and Field from Source: Created By 6.        To set the index, click on 0 and enter the required number, here it would be 1...

Form cannot be rendered error when opening Infopath list forms

While trying to open the InfoPath form created for lists in SharePoint 2010, an error was encountered as given - " The form cannot be rendered. This may be due to a misconfiguration of the Microsoft Sharepoint ServerState service. For more information contact your server administrator" This error can occur if the state service is not activated while creating the web application. To resolve the error, follow the below steps. • Open central admin -- Application management --Manage web applications. In the page that opens select the web application and click on Service connections in the SPRibbon. • The above step will open the Configure Service Application Associations dialog box. Select the State Service and click OK. • Then the configuration wizard must be run to activate the services

Sharepoint 2010 correlation error - Request for security token failed with exception

After windows update, Sharepoint 2010 sites do not come up and shows correlation error. Or, the site comes up but the global navigation and left navigation shows error. On the ULS log when checked it shows - “Request for security token failed with exception: System.ServiceModel.ServiceActivationException: The requested service, 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas' could not be activated. See the server's diagnostic trace logs for more information.    Server stack trace:      at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)     at System.ServiceModel.Channels.RequestCha...

Infopath 2010 Tips - Custom close button and hide the ribbon

How to hide the ribbon in Infopath 2010 Go to list – Customize List tab- Click on Modify Form Webparts – Click on the content type form – Edit Form A new page with the Infopath form webpart would come up   Click on Edit webpart Uncheck Infopath Ribbon or toolbar. Click Apply & OK. Click on Stop Editing of Page. Now when the Edit form is displayed on browser, it would not have the ribbon. How to add custom close button Open the form in Infopath 2010 Add a button - Select the button and click Manage Rules In the rules pane – click on New – Action – Add – Close the form No conditions to be added. Rename the button to Close/Cancel Publish the form

Multiple ways to hide My Settings/Sign out/Personalize/My Profile in Welcome Username control in SharePoint 2010

Jquery   to hide My Settings, Personalize this page, Sign in as different user jQuery(document).ready(function($){   $("[text='Sign in as Different User']").remove();   $("[text='My Settings']").remove();   $("[text='Personalize this Page']").remove(); }); Hide My Site and My Profile using CSS To hide the menu options, add the below CSS in master page .ms-MenuUIUL LI[text='My Site'] {  DISPLAY: none } .ms-MenuUIUL LI[text='My Profile'] {  DISPLAY: none } .ms-MenuUIUL LI[text='My Settings'] {   DISPLAY: none }