Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7577003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:04:32+00:00 2026-05-30T17:04:32+00:00

I have a Sharepoint custom field with a custom string property. It works perfectly,

  • 0

I have a Sharepoint custom field with a custom string property.
It works perfectly, i can set the property by my custom custom control and the value is stored.
I want to to customize the field rendering in list view using my XSL file and according to the value of the custom property.

How can i get this value?

[EDIT]
This is the field xml defintion:

<?xml version="1.0" encoding="utf-8" ?>
<FieldTypes>
  <FieldType>
    <Field Name="TypeName">Secure</Field>
    <Field Name="ParentType">Text</Field>
    <Field Name="TypeDisplayName">Secure</Field>
    <Field Name="TypeShortDescription">Secure Field</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="ShowOnListCreate">TRUE</Field>
    <Field Name="ShowOnSurveyCreate">TRUE</Field>
    <Field Name="ShowOnDocumentLibraryCreate">TRUE</Field>
    <Field Name="ShowOnColumnTemplateCreate">TRUE</Field>
    <Field Name="Sortable">FALSE</Field>
    <Field Name="Filterable">FALSE</Field>
    <Field Name="FieldTypeClass">MyProject.SecureFields.SecureField, $SharePoint.Project.AssemblyFullName$</Field>
    <Field Name="FieldEditorUserControl">/_controltemplates/SecureFieldPropertyEditor.ascx</Field>
    <PropertySchema>
      <Fields>
        <Field Name="ShowedFieldName" Hidden="TRUE" DisplayName="ShowedFieldName" Type="Text" MaxLength="255">
          <Default></Default>
        </Field>
      </Fields>
    </PropertySchema>
  </FieldType>
</FieldTypes>

And this is the XSL:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
                xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
                version="1.0"
                exclude-result-prefixes="xsl msxsl ddwrt"
                xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
                xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
                xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:SharePoint="Microsoft.SharePoint.WebControls"
                xmlns:ddwrt2="urn:frontpage:internal">

  <xsl:template match="FieldRef[@FieldType = 'Secure']" mode="Text_body">
    <xsl:param name="thisNode" select="." />
    <xsl:variable name="showedFieldName" select="./@*[name()=current()/@ShowedFieldName]" />
    <span style="background-color:lightgreen;font-weight:bold">
      <xsl:value-of select="$showedFieldName"/>      
    </span>
  </xsl:template>

</xsl:stylesheet>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:04:33+00:00Added an answer on May 30, 2026 at 5:04 pm

    iam crazy from lack of MS guys and MSDN documentation.
    Maybe this help, worked for my Custom Field Type (Custom property named LinkType):

        <xsl:template match="FieldRef[@FieldType = 'EnhancedTitleField']" mode="Text_body">
    
        <xsl:param name="thisNode" select="."/>
        <xsl:variable name="linkType" select="$thisNode/@LinkType" />
        <xsl:choose>
          <xsl:when test="$linkType=''">
            empty
          </xsl:when>
          <xsl:otherwise>
            link
          </xsl:otherwise>
        </xsl:choose>
    
    
      </xsl:template >
    

    …
    Later, after hours of testing maybe founded solution. When I inherit my field from “SPFieldMultiLineText”, owerride “GetFieldValueAsHtml” and change field definitio it starts working.
    Here is key code of working combination:

    <Field Name="ParentType">Note</Field>
    <Field Name="CAMLRendering">TRUE</Field>
    <Field Name="AllowBaseTypeRendering">TRUE</Field>
    
    <RenderPattern Name="DisplayPattern">
      <Column Name="ID" /><HTML><![CDATA[;]]></HTML><Column Name="Title" /><HTML><![CDATA[;]]></HTML><PageUrl WebRel="FALSE" URLEncode="TRUE"/>
    </RenderPattern>
    

    In code:

    EnhancedTitleField : SPFieldMultiLineText
    

    …

    public override string GetFieldValueAsHtml(object value)
    {
    
        string[] splitedValue = value != null ? value.ToString().Split(';') : new string[0];
    
        int id = splitedValue.Length > 0 ? int.Parse(splitedValue[0]) : 0;
        string title = splitedValue.Length > 1 ? splitedValue[1] : "";
        string source = splitedValue.Length > 2 ? splitedValue[2] : "";
    
        string html = EnhancedTitleFieldControl.GetHtml(this, id, title, source);
    
        return html;
    }
    

    Somehow in SPFieldMultilinetext CAML generated value is passed to this method. So you can prepair context data from caml for processing in this method where you HAVE ACCESS to CUSTOM PROPERTIES!

    Hope this helps :), and MS guys, DO SOMETHING with MSDN documentation!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I hide a field in a SharePoint alert? I have a custom
I have a custom list in SharePoint (specifically, MOSS 2007.) One field is a
This is maybe a long shot, but I have a custom field control that
I am creating a custom field in SharePoint 2007. I have seen other solutions
I have a custom sharepoint web part that is throwing the following exception: System.Security.SecurityException:
I have a custom SharePoint page with several dataviews. The dataviews essentially filter documents
I have defined a custom Sharepoint list for special attributes related to a software
We have a sharepoint based application that uses a custom database for storing metadata/files
I have created a custom list as a feature in sharepoint. i need to
I have defined a custom list template type for SharePoint . I install it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.