1

I'm creating a custom field in SP 2007. I need to Get the Custom field value and field properties on Item click, in the list item display view. Also i Need to pass these values to a JavaScript.

So, Customizing the CAML code inside the RenderPattern for this. I would like to know how this could be done.

-- I have added the below code to the CAML

<RenderPattern Name="DisplayPattern">
  <HTML><![CDATA[</div><br/><br/><div>Name Value:</div><br/>]]></HTML>
  <ScriptQuote>
    <Property Select="Name" HTMLEncode="True" />
  </ScriptQuote>

  <HTML><![CDATA[<div>Custom Property 1 Value</div><br/>]]></HTML>
  <ScriptQuote>  
      <Property Select="MyCustomProperty1" URLEncode="True" />
  </ScriptQuote>
  <HTML><![CDATA[<div>Custom Property 2 Value</div><br/>]]></HTML>
  <ScriptQuote>
      <Property Select="MyCustomProperty2" URLEncode="True" />
  </ScriptQuote>
  <HTML><![CDATA[<div>Description : </div><br/>]]></HTML>
  <ScriptQuote>
    <Property Select="Description" HTMLEncode="True" />
  </ScriptQuote>
  <HTML><![CDATA[<div>Required : </div><br/>]]></HTML>
  <ScriptQuote>
    <Property Select="Required" HTMLEncode="True" />
  </ScriptQuote>
  <Column HTMLEncode="TRUE"/>

</RenderPattern> 

I get "_x0070_df2" for name. Just "" for the two of my custom properties.

Whereas for Description I get the value and for Required property i get "FALSE". Wondering why i didn't get the values set for the custom properties ....

Tried URLEncode for the custom properties instead of HTMLEncode which had the same result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.