GetlistItem - <ViewFields> - Web services
- From: mak2008 <mak2008@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 May 2009 06:18:02 -0700
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
.
- Prev by Date: 49 Opinion de Dsiconsolas.com 48771
- Previous by thread: 49 Opinion de Dsiconsolas.com 48771
- Index(es):
Relevant Pages
|