Taxonomy Fields

May 1, 2015 at 12:31 PM
Edited May 1, 2015 at 12:32 PM
Hello,

I'm lost with those taxonomy fields... everywhere I found information on it, it says the format is something like "TermName1|TermGuid1;TermName2|TermGuid2"

BUT

when I use SPServices, I get the following format: "SomeInt1;#TermName1;#SomeInt2;#TermName2". This is really anoying because I can not do a simple split() to get only the term, I have to extract only ODD splitted values to get the terms.

The query I'm doing is the following:
$().SPServices({
                    operation: 'GetListItems',
                    async: false,
                    debug: true,
                    listName: 'Documents',
                    CAMLViewFields: '<ViewFields><FieldRef Name="Title" /><FieldRef Name="Authors"/><FieldRef Name="Keywords"/></ViewFields>',
                    CAMLQuery: '<Query><Where><Eq><FieldRef Name="ID"/><Value Type="Counter">6</Value></Eq></Where></Query>',
                    completefunc: function(xData, Status) {
                        $(xData.responseXML).SPFilterNode("z:row").each(function() {
                            alert($(this).attr('ows_Keywords'));
                            alert($(this).attr('ows_Authors'));                         
                        });
                    }
                });
Both alerts (for Keywords and Authors) are displaying in the format "int1;#name1;#int2;#name2".

edit: and if I need the corresponding term GUID to do some other operations, I don't have it :-(

Am I doing something wrong??
Thanks for help!
PlaTyPuS