Skip to main content

Posts

Showing posts with the label custom list

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.

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

Remove the checkbox in Dataview/XsltView WP in SP2010

When inserting a dataview webpart in SP2010, checkboxes appear on the left side of each row. To remove it, do the following from Sharepoint- Go to the list - View Settings - in Tabular section, uncheck  'Allow individual inline editing' To do it in SPD, there is no direct setting- In the View tag of XSLTwebpart, add 'Tabular = False' e.g. before - <View Name="{123456788-A999-ABBC-VVYY-1234ABCDXX}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="TestView" Url="/SitePages/Test.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png"> after - <View Name="{123456788-A999-ABBC-VVYY-1234ABCDXX}" TabularView="False" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="TestView" Url="/SitePages/Test.aspx" Level="1" BaseViewID="1...

Disbale Submit button in Infopath list forms in Sharepoint 2010

List forms can be customized using Infopath 2010. If the fields are kept mandatory, the red asterik sign appears on text fields. It would appear till the field is filled . Also alt text would come as 'Cannot be blank', which can be annoying at time. The alternative option would be to disable the Submit button till all the mandatory fields are filled. Click on Submit button, click on Manage Rules and Formatting Select the fields that are required and check on Disbale the control. For e,g, if in the form, say the fields, Name, Designation, Company Name are required, create the rule to evaluate-  Name is blank or Desingnation is blank or Company Name is blank. When the condition is true, Submit button is disabled. When all three are filled, the condition is false and therefore Submit buton is enabled.

Add images to items in custom list in Sharepoint 2007

Had a requirement to include images to a custom list (along with single-line and multi-line columns) in Sharepoint 2007 server. There were around 100 items to be added and wanted to find a work-around than adding as attachments to the respective items. Created a standard name format for the images Eg Name1, Name2 etc in the harddisk Created the custom list with the required columns and for image created Hyperlink or Picture column and selected the format for image as Hyperlink. Create a picture library in the site. Opened the picture library in Windows explorer and copied the images to the Picture library The image url now would be http://<siteurl>/<listname>/<imagename.imageformat> for eg - http://xyzsite.com/Piclib/Name1.jpg With a little of formatting in excel the column with the url's can be created. Edit the list in datasheetview and copy-paste the url row to Image column, in the list If required, can change the Image column format to Pict...