Posts Tagged ‘SharePoint’

Parameterize your page url to access SharePoint functionality

Tuesday, July 28th, 2009

Webpart maintenance page
Some people think they’re removing a webparts by clicking on ‘x’, actually the webpart is closed and stille exists (invisible) on the page. With the SharePoint webparts maintenance page you can close, remove or delete (multiple) webparts on a page. This is very handy page specially when your well written SharePoint webpart causes an error so the whole page can’t be displayed. Here is the solution to remove the blocking webpart, add the following to your page url: ?contents=1

Acces the SharePoint ToolPanes
Is it possible to edit forms pages like AllItems.aspx, DispForm.aspx EditForm.aspx …? Yes, add the following to you’re Forms page url ?ToolPaneView=2, now you can edit existing webparts or add new webparts, a content editor webpart with a disclaimer text for example. With ?ToolPaneView=3 you can search for webparts and with ?ToolPaneView=5 you can upload you’re custom webpart.

Do not use SharePoint Computed fields

Friday, January 16th, 2009

In this posting I will explain why not to use Computed fields. I was experiencing the following issue with the Computed field type:

I made a Computed column that combines two fields seperated with a minus sign:
 
<Field Name=”IDTitleField” Type=”Computed”>
   <FieldRefs>
      <FieldRef ID=”{GUID}” Name=”Title”/>
      <FieldRef ID=”{GUID}” Name=”ID”/>
   <FieldRefs>
   <DisplayPattern>
      <Column Name=”ID”/>
      <HTML><![CDATA[ - ]]></HTML>
      <Column Name=”Title”/>
   </DisplayPattern>
</Field>

After creating the column you can see the column at the site collection columns. You can add the column to you’re site collections contenttypes. But when you add the contenttype to a list the Computed columns are not copied(!) to the list. Why the Computed fields are not copied I don’t know.

So I start using the Calculated field with the following:

<Field Name=”IDTitleField2″ Type=”Calculated” ResultType=”Text”>
   <FieldRefs>
      <FieldRef ID=”{GUID}” Name=”Title”/>
      <FieldRef ID=”{GUID}” Name=”ID”/>
   <FieldRefs>
   <Formula>=CONCATENATE(ID, ” - “, Title)</Formula>
</Field>

This Calculated field solved my issue. Because the calculated fields are copied when adding the contenttype (which contains the Calculated field) to the list! So my conclusion is to avoid using the Computed field type. Therefore you can use the Calculated field type in many cases.