Showing posts with label column. Show all posts
Showing posts with label column. Show all posts

Thursday, February 21, 2013

Hide column on Newform.aspx. In SharePoint

Issue: Client reported that on newform.aspx page, there is one column which appear for awhile and then disappears.
Troubleshooting:
-          Checked if the column is custom created.
-          Checked if the column has its value hidden in the content type column setting.
-          Marked the column value to be required.
-          Saving the list as template without content and worked fine on the other site, gives issue on the same site.
-          Tried deleting the problem column form the problem list, its still disappears from the newform.aspx page.
-          Checked the list in SharePoint Designer to check if the newform.aspx page is customized. No customizations were implemented.

Resolution:
On further troubleshooting, we edited the new.aspx page and found two ‘content editor webpart’ each containing a Java script code.
Out these two codes one was like given below:
           
Where nth-Child is used as an argument to pass to the table and function to perform is hiding.
The 8th number is the column number in the newform.aspx page. Editing the page and changing the number equivalent to the number of the column would hide that column from the page.
Either changing the number to something to not equal to the column number or removing the code had resolved the issue.
Applies to:
-          SharePoint 2007
-          SharePoint 2010.
-          SharePoint Designer.  

Tuesday, May 8, 2012

Cannot delete a Corrupted lookup Column from the list

Issue : Just Today i came accross a issue in Which the User had a List with many columns and One of the column Which was a look up column was corrupted

used to give a error "Unknown Error"

We were not able to Delete or edit the column

After a lot of research we found a work around to delete the Column

Checked the Url and found the below

/_layouts/FldEditex.aspx?List=%7B37920121%2D19B2%2D4C77%2D92FF%2D8B3E07853114%7D&Field=Product%5Fx0020%5FDescription

Which is a wrong url it should be

/_layouts/FldEdit.aspx?List=%7B37920121%2D19B2%2D4C77%2D92FF%2D8B3E07853114%7D&Field=Product%5Fx0020%5FDescription

Just remove ex from FldEditex.aspx => FldEdit.aspx

And you will be able to get to the inside of the column where you can edit or Delete the column .

Cause - Unknown

Saturday, May 5, 2012

Capacity management - Column limits

Limit Maximum value Limit type Size per column Notes
Single line of text
276
Threshold
28 bytes
SQL Server row wrapping occurs after each 64 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 384 Single line of text columns per SharePoint list (6 * 64 = 384). However, because the limit per SharePoint list item is 8,000 bytes, of which 256 bytes are reserved for built-in SharePoint columns, the actual limit is 276 Single line of text columns.
Multiple Lines of Text
192
Threshold
28 bytes
SQL Server row wrapping occurs after each 32 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 192 Multiple lines of text columns per SharePoint list (6 * 32 = 192).
Choice
276
Threshold
28 bytes
SQL Server row wrapping occurs after each 64 columns in a SharePoint list. The default row wrapping value of 6 allows for a maximum of 384 Choice columns per SharePoint list (6 * 64 = 384); ); however because the limit per SharePoint list item is 8,000 bytes, of which 256 bytes are reserved for built-in SharePoint columns, the actual limit should be 276 Choice columns.
Number
72
Threshold
12 bytes
SQL Server row wrapping occurs after each 12 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 72 Number columns per SharePoint list (6 * 12 = 72).
Currency
72
Threshold
12 bytes
SQL Server row wrapping occurs after each 12 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 72 Currency columns per SharePoint list (6 * 12 = 72).
Date and Time
48
Threshold
12 bytes
SQL Server row wrapping occurs after each eight columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 48 Date and Time columns per SharePoint list (6 * 8 = 48).
Lookup
96
Threshold
4 bytes
SQL Server row wrapping occurs after each 16 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 96 single value Lookup columns per SharePoint list (6 * 16 = 96).
Yes / No
96
Threshold
5 bytes
SQL Server row wrapping occurs after each 16 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 96 Yes / No columns per SharePoint list (6 * 16 = 96).
Person or group
96
Threshold
4 bytes
SQL Server row wrapping occurs after each 16 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 96 Person or Group columns per SharePoint list (6 * 16 = 96).
Hyperlink or picture
138
Threshold
56 bytes
SQL Server row wrapping occurs after each 32 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 192 Hyperlink or Picture columns per SharePoint list (6 * 32 = 192) ); however because the limit per SharePoint list item is 8,000 bytes, of which 256 bytes are reserved for built-in SharePoint columns, the actual limit should be 138 Hyperlink or Picture columns.
Calculated
48
Threshold
28 bytes
SQL Server row wrapping occurs after each eight columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 48 Calculated columns per SharePoint list (6 * 8 = 48).
GUID
6
Threshold
20 bytes
SQL Server row wrapping occurs after each column in a SharePoint list. The default row wrapping value of six allows for a maximum of 6 GUID columns per SharePoint list (6 * 1 = 6).
Int
96
Threshold
4 bytes
SQL Server row wrapping occurs after each 16 columns in a SharePoint list. The default row wrapping value of six allows for a maximum of 96 Int columns per SharePoint list (6 * 16 = 96).
Managed metadata
94
Threshold
40 bytes for the first, 32 bytes for each subsequent
The first Managed Metadata field added to a list is allocated four columns:
  • A lookup field for the actual tag
  • A hidden text field for the string value
  • A lookup field for the catch all
  • A lookup field for spillover of the catch all

Each subsequent Managed Metadata field added to a list adds two more columns:
  • A lookup field for the actual tag
  • A hidden text field for the string value

The maximum number of columns of Managed Metadata is calculated as (14 + (16 * (n-1))) where n is the row mapping value (default of 6).

How to delete a corrupt column in the sharepoint list - Sharepoint 2007


Today I came across an issue where in I was not able to delete a corrupted lookup column from a list . after doing some research i found a good site with the resolution . source site mentioned at the end of the post. 

Please save the List as template or take the backup of the site Before you make any changes.

 Create an asp.net page with the code at the bottom of this post and put it in your layouts directory. By default, this is "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS".

Then, browse the page by going to http://[your_sharepoint_domain]/sitename/_layouts/[whatever_you_called_the_page].aspx

Find the column and remove it.

<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase"
MasterPageFile="~/_layouts/simple.master" %>

<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Import Namespace="Microsoft.SharePoint" %>

<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities"
Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
Delete Column
</asp:Content>

<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script runat="server" language="c#">
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

if (!IsPostBack)
{
LoadLists();
}
}

private void LoadLists()
{
ListName.DataSource = SPContext.Current.Web.Lists;
ListName.DataTextField = "Title";
ListName.DataValueField = "ID";
ListName.DataBind();
}

protected void ListName_OnSelectIndexChanged(object source, EventArgs e)
{
SPList selectedList = SPContext.Current.Web.Lists[new Guid(ListName.SelectedValue)];
FieldName.DataSource = selectedList.Fields;
FieldName.DataTextField = "Title";
FieldName.DataValueField = "ID";
FieldName.DataBind();
}

protected void Delete(object sender, EventArgs e)
{
try
{
SPList selectedList = SPContext.Current.Web.Lists[new Guid(ListName.SelectedValue)];
SPField selectedField = selectedList.Fields[new Guid(FieldName.SelectedValue)];

selectedField.Delete();
selectedList.Update();

EventMessage.Text = "Column Deleted!";
}
catch (Exception ex)
{
EventMessage.Text = ex.Message;
}
finally
{
LoadLists();
FieldName.Items.Clear();
}
}
</script>

<SharePoint:FormDigest runat="server" />

<table>
<tr><td colspan="2"><asp:Label ID="EventMessage" runat="server" /></td></tr>
<tr>
<td>List Name: </td>
<td>
<asp:DropDownList ID="ListName" OnSelectedIndexChanged="ListName_OnSelectIndexChanged" AutoPostBack="true" runat="server" />
</td>
</tr>
<tr>
<td>Column Name:</td>
<td><asp:DropDownList id="FieldName" runat=server /></td>
</tr>
<tr>
<td></td>
<td><asp:Button ID="Button1" runat=server OnClick="Delete" text="Delete" /></td>
</tr>
</table>
</asp:Content>

Users cannot see the checked out files in the folder/ library

I Came across a Issue today wherein the user opened a ticket for the below issue Issue : Users cannot see the checked out files in the fo...