This project has moved and is read-only. For the latest updates, please go here.


Text fields are displayed as a textbox. They work similarly for each of these types:
  • Single line of text
  • Number
  • Currency
  • SPFieldFile (Document library "Name" field)


See Common SPField functions for generic functions and properties.

Single line of text

var field = SPUtility.GetSPField('Title');
field.SetValue('Hello world!');

// GetValue returns a string
var value = field.GetValue();


var field = SPUtility.GetSPField('Number Field');

// GetValue returns a number
var value = field.GetValue();


var field = SPUtility.GetSPField('Currency Field');

// GetValue returns a number (ex:  97.95)
var value = field.GetValue();

// GetFormattedValue returns a formatted string (ex: $97.95)
value = field.GetFormattedValue();

SPFieldFile (Document library "Name" field)

var field = SPUtility.GetSPField('Name');
field.SetValue('My Document Name');

// GetValue returns a string
var value = field.GetValue();

Last edited Feb 6, 2011 at 11:26 PM by KitMenke, version 5