The field was name "A Type" and because of space or any other unsuitable characters, it will set it as such in its internal field name.
You can always find out what its internal name is by going to the List settings and columns, right click on the field hit properties and in the dialog window's look in the bottom of the Address URL property.
It will show something like this for "A Type" that is "A%5Fx0020%5FType"
Using A%5Fx0020%5FType in the JQuery code will not work as instead
%dF needs to be underscore
Therefore, it should become A_x0020_Type in the field referencing code.
eg
<viewFields> \
<ViewFields> \
<FieldRef Name='Title' /> \
<FieldRef Name='A_x0020_Type' /> \
</ViewFields> \
</viewFields> \
And when using ows to get the xml nodes returned.
$(this).attr("ows_A_x0020_Type")
Thanks for this post to point me into the right direction.
http://abstractspaces.wordpress.com/2008/05/07/sharepoint-column-names-internal-name-mappings-for-non-alphabet/
I was scratching my head for a while.
To avoid this, never use space, semi colon or non alphanumeric characters when naming fields. Use underscore for space and this problem just gets side stepped.
No comments:
Post a Comment