GetlistItem - <ViewFields> - Web services

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

Currently, I am developing a SharePoint web services on Visual Studio 2008,
VB.NET window form project. I successfully manage to call the GetListitem
and it return xml data. The only thing I have great difficulties is
<ViewFields>.

Here is my situation:

On a SharePoint v3 site, there is a list call ABC.

ABC has ID, Package, Version and TargetLevel. On the ABC list,
ID is a counter, automaticall generate by SharePoint;
Package is a combo drop list containg all package names. The user select
one package or leave it blank. Package is not mandatory;
Version is a text field;
TargetLevel is a combo drop list contaings all Target names. This is a
mandatory field and user must select a TargetLevel from the combo drop list;

Lets assume that ABC has only two records which I have shown above.

On the ABC list, the there are columns all showing, ID, Package, Version and
TargetLevel. The two records exists on ABC lists clearly like this:
Id Package Version TargetLevel
27809 aaa 12.12.12 target1
27808 13.13.13 target2

The package for 27808 is blank. the package for 27809 is aaa.


I use GetListItems to retrieve all records from ABC. That worked fine and
the xml results will be:

Id Package Version TargetLevel
27809 aaa 12.12.12 target1
27808 13.13.13 target2


Scenario #1
If I filter the query to get only 27809, the xml result will be:
Id Package Version TargetLevel
27809 aaa 12.12.12 target1


Scenario #2
If I filter the query to get 27808, the xml result will be:
Id Version TargetLevel
27808 13.13.13 target2

In scenario #2. I dont know why Package column is missing. I want the xml
result to return as an empty "package" column like

Id Package Version TargetLevel
27808 13.13.13 target2


I use the internal name when using with ViewFields. I have retest it over
and over. I am pretty sure that any records that have blank value for package
will not display Package column with blank values. I dont understand why
Package column disappeared when there is no data for package!

i follow the syntax at
http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx and
http://msdn.microsoft.com/en-us/library/ms467521.aspx
and
http://msdn.microsoft.com/en-us/library/dd588595.aspx
and
http://sharepointmagazine.net/technical/development/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list

I dont know what else im missing and do you have any ideas why <ViewFields>
ommit the package column?????

I would be eternity grateful if you could assist me.

Thanks.

Regards,

Mak

--
mak@xxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: Back Again - RPM using a more efficient database format
    ... XML parsing is also not exactly a light task. ... efficient database scheme. ... rather than a new 2 meg package list for each change to the list. ... I read messages from the public lists. ...
    (Fedora)
  • Re: TclXSLT question: best approach?
    ... Tcl script using XSLT and then eval'ing it is something I've been doing ... dom::serialize command because the dom package is separate to the xslt ... know that its intended serialisation is as text rather than as XML. ...
    (comp.lang.tcl)
  • Confusion over directory search order for "use"
    ... I'm going to use a package for this and I've chosen to code the ... config in XML and use XML::Simple to read it in. ... directory in which Global.pm and "tryit" live. ... [henry@neptune henry]$ grep NFB tryit ...
    (comp.lang.perl.misc)
  • Re: Broken iWork 09 FACT
    ... longer just a package, as '08 files are. ... much like the DOCX format and the like. ... XML content. ... ODT, etc., were becoming an ISO standard, they created DOCX to confuse ...
    (comp.sys.mac.advocacy)
  • Re: Want true instantiated objects from XML
    ... use warnings qw; ... I can parse most of the XML I need with XML::Simple. ... Using "strict" the $s variable in my ... adding in the Person package and correcting ...
    (comp.lang.perl.misc)