Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Web Services DataView Issue: Filters Not Working

  Asked By: Travon    Date: Jan 04    Category: Sharepoint    Views: 1775

Okay I have a slight problem that I cannot figure out and maybe one
of you can point me in the right direction here.

I have a list that has a "calendar" field called Release Date. Its
used to manage future release of content. An user could write a few
new articles for the home page for our Corporate News section. Then
using future release dates, we can "schedule" these articles to post
on certain days. In the data view we would filter using this field
as such: Release Date is Less Than or Equal To Current Date. If an
article has a future release date it will not diplay on that date.

Now I am trying to use Web Services DataView to surface this content
on the home page from another sub-area (which we did for security
purposes - the lists and releated libraries reside in a separate
area than the home page). When I go to filter by Release Date so
that only those items with a Less Than or Equal to Current Date show
up however, it simply just displays NOTHING, does not recognize that
field. The field using Web Services DataViews is
named "ows_Release_x0020_Date" rather than just "Release_x0020_Date"
which is what its named in a normal DataView. I think it either does
not recognize it or it does not handle calendar fields properly.
The only types of filters that seem to work okay using Web Services
DataViews are boolean (yes or no). It just does not work like
regular DataViews.

Is there a way to be able to provide this functionality, some coding
adjustment perhaps, using Web Service DataViews?

Share: 

 

7 Answers Found

 
Answer #1    Answered By: Freddy Heath     Answered On: Jan 04

You could try adding a computed field  named Releasable and base it on the
comparison of the release  Date and [Today]

To do this you would have to also temproarily add a computed field named
Today that is = to [Today]. Then your Releasable field will compare Release
Date to your Today field. Once the releasable field is vreated you can
delete your computed Today field and the system will use [Today] for the
Releasable computations.

 
Answer #2    Answered By: Joanna Dixon     Answered On: Jan 04

I am not a programmer so I've have to be
walked thru this process. Is there any documentation redily
available for manipulating calculated fields  that you know of?

So there is no way of using filters  in WSDV like you use them in
regular DVs that you know of right off the bat?

 
Answer #3    Answered By: Justine Barrera     Answered On: Jan 04

Did you try querying a named  ListView?

 
Answer #4    Answered By: Laura Walker     Answered On: Jan 04

I am not sure what you mean by this. The method I am using for creating Web Service DataViews is as follows, maybe I am not doing it correctly:

1) I select the XML Web Services from the data  Source section  on FrontPage, I click on "Add to Catalog".

2) From there in the field  named: Service description location ... I type: urlnamehere.com/areaname/_vti_bin/lists.asmx - I click on "Connect Now".

3) I select "GetListItems" in the Operation field drop-down list.

4) Under Parameters... I select the "ListName" field and click on "Modify" and I type in the name of the list, in this case: EmployeeNewsletters and click okay.

I then proceed to manipulate that data like a regular data view. However, all the fields  are renamed to "ows_ ....". Is that supposed to happen? If so, are they supposed to behave in a way that filters  are not working  properly?

 
Answer #5    Answered By: Cory Brooks     Answered On: Jan 04

I can't get there now but I thought that you could specify a list  name
OR a view  name. If you can embed the filter  in the view it may
accommodate your needs.

Otherwise, I'd guess that either your filter CAML is malformed or the
feature is broken on the Lists.asmx Web Service.

Can you ever filter on anything using the Web Service?

 
Answer #6    Answered By: Ruth George     Answered On: Jan 04

Yes, I can filter  on yes/no type of filters, but it must be done in
boolean context. For example, that same "Newsletter" list  has a
yes/no checkbox called  "Spotlight" --- this field  (normally) allows
content to be spotlighted with a picture and a summary of the
article, whereas all other entries that have Spotlight = no, just
show the title of the article as a link to a display page  (no
picture, no summary). Using web  service dataviews, I can filter
ows_Spotlight = 0 for "no" and ows_Spotlight = -1 for "yes". This
works, however CALENDAR dependent fields  do not... and that's really
the only two types  of filters  for content  manipulation we need.

Other than using Traditional or Web Services DataViews, how are
people surfacing content on the home  page that resides in other
areas? Maybe I need to learn a new approach here. I am still very
new to the FrontPage/Sharepoint UI design field. I am a traditional
UI designer for large scale web applications (normally using
ASP.NET, PHP, or JSP), although I am not a programmer.

 
Answer #7    Answered By: Peter Peterson     Answered On: Jan 04

If you are trying to display data  on the homepage from the same
server then there is no need to be using webservices. I'd take a
look at the SharePoint OM and more specfically SPView.Query.

 
Didn't find what you were looking for? Find more on Web Services DataView Issue: Filters Not Working Or get search suggestion and latest updates.




Tagged: