Navigate Up
Sign In
Supporters of Developer
Web

OWSAPI

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.
OWSAPI

An alternative to web service queries, using the fort worth web development |web method (RPC) Display method has some advantages:

  • Possible to pull a list's folders and items in the same call (e.g., Discussion Groups) - hint: use the "&ID=1" parameter
  • Possible to pull data and schema in the same call (two methods needed using pool covers and halloween contacts web services)
  • May have speed/security advantages over web services. //TODO check against large and small data sets.

An alternative to DOM reading, using this API has significant advantages:

  • DOM reading is limited to the DOM content, meaning the view used and loaded groups
  • DOM reading fails to find ID values for lookups displayed by Title
  • Custom filters, especially for calculated columns, do not exist
  • term papers
  • buy research papers online
  • cat laser toy ,

Purpose

So what kinds of things can we do with this tool?

Feed a Charting API

Several charting and graphing APIs are ready to take your data and make it pretty.  This project hopes to make that both fast and easy. //TODO create full example with popular graph API

Perform Actions on Calculated Columns

I hear a frequent request to do something with calculated columns.  Filtering, grouping, adding, averaging, etc. are all missing from the SharePoint interface.

Compare Lists

This often requires a customized DVWP and a merged data source to get started.  However, by parsing the owssvr.dll results into the ows object, we can quickly and easily compare arrays of values in the two lists. //TODO research a join/merge function using two or more results

Getting Started

  1. Pick an easy page to start with, any list or library default view page will work (e.g., /Lists/Tasks/AllItems.aspx).
  2. Add jQuery to your page (tested with 1.3.1).
  3. Add the owsapi script to your page (see below article).
  4. Invoke the construction of the ows object with some document.ready jquery:
$(function(){
	if (typeof ctx=='object'){ //make sure this web page queried a list already
		owsapi();
	}
});

That code can be included after the owsapi closure. The example will use the defaults and build an ows object and all of its methods based on ctx1 (the first List View Web Part loaded on the page).

NOTE:  By changing the defaults to "ctx", your default will construct the ows object around the last web part added to the page.  This is in the order it was added, not loaded (see the Contents page to see the order).

The base ows object will then include a ctx1 subclass. ctx1 will have two subclasses, schema and data. Schema represents the schema portion of the owssvr.dll result while data represents the rows.

Using Options

Now you can access the ows object, see the examples in the comments of each method.

We can make a more complex call to owssvr.dll by passing options. An option combination I use often, in the example below, allows me to pull all schema data and all attributes for all rows (bypassing the default view)|:

$(function(){
	if (typeof ctx=='object'){
		owsapi({view:"",command:"&Query=*"});
	}
});

Using Callback

If I want something to happen after the data loads, I can add a callback function.

$(function(){
	if (typeof ctx=='object'){
		owsapi({view:"",command:"&Query=*"},function(o){
			var x = ows.getData(o.ctx);
			alert(x.length);
		});
	}
});

That will alert the number of rows returned by the query. Notice we give the callback function (o) as a parameter. This is because the owsapi will return the options back with the callback. That way, we don't have to hard-code the ctx name.  We can also make another call to owsapi for ctx2 (assuming we have another List View on the page) and ows.ctx2 will be created (we don't create another ows object) poker chairs .  If I know the List's GUID, I can create a custom ctx name and store the results in my ows object.

Using Filters

Some of the methods allow filters. Filters are really nice for quickly isolating data. Here's an example:

$(function(){
	if (typeof ctx=='object'){
		owsapi({view:"",command:"&Query=*"},function(o){
			var x = ows.getValues(o.ctx,"% Complete",["% Complete","<",1]);
			alert(x);
		});
	}
});

On a Tasks list, this will get all defined values for % Complete then filter for the rows where % Complete is < 1. You can stack filters to create ranges. For instance, ["% Complete","<",1,"Status","!=","Completed"]| fort worth web design would also exclude Completed Tasks from being returned, even if the % Complete is less than 1.

Source

Source code is now available on owsapi.codeplex.com

SharePoint can have Wildcard searching... » Andy Burns' SharePoint Blog

Categories:
No categories were selected

Comments

1m hdmi cable

1m hdmi cable

I just wanna thank you for sharing your information and Stumblerz your site or blog this is simple but nice article I've ever seen i like it i learn something today.1m hdmi cable

Posted 28-Jul-2011 by 1m hdmi cable
Lipozene Reviews

thanks

Im impressed, I must say. Very rarely do I come across a site thats both informative and entertaining, and let me tell you, youve hit the nail on the head. Your site is important; the issue is something that not enough people are talking intelligently about. Im really happy that I stumbled across this in my search for something relating to this issue.

Posted 12-Jun-2012 by Lipozene Reviews
Liporexall

thanks

Thanks so much with this fantastic new web site. I’m very fired up to show it to anyone. It makes me so satisfied your vast understanding and wisdom have a new channel for trying into the world.

Posted 01-Jul-2012 by Liporexall
Lipozene

thanks

I like the cut of your job :) or at least your thought process but sorry to say, I honestly think you would have fully sold me on the idea had you been able to back up your premis with a substantial bit more solid facts. Lipozene

Posted 05-Aug-2012 by Lipozene
hydroxycut reviews

nice

I am very much overwhelmed by your thoughts for this particular story. A more deeper and staged knowledge would be good for me

Posted 09-Aug-2012 by hydroxycut reviews
Fast Weight Loss

nice

Pretty cool post. It’s really very nice and useful post .Thanks for sharing this with us! it’s my first visit.

Posted 12-Aug-2012 by Fast Weight Loss
Buy Degree

Great

Did you once thought of taking a good pay job and you capable of how to run it, but your manager told that you aren't satisfy the minimum qualification as you didn't posses a college or university degree? So, how about buying your degree through online? Isn’t this sounds next to no way? No, it can be reached by the way.

Posted 16-Aug-2012 by Buy Degree
Weight Loss Supplements

fantastic

The first time I came here, less than 10 seconds the display is perfectly open, and the loading is completed less than 20 seconds and to open the article only took about 7 seconds. So I think this is very fast! Incredible! Trying to maintain!

Posted 17-Aug-2012 by Weight Loss Supplements
Top website

Nice

I seriously think that a little more designing is very much required.

Posted 03-Sep-2012 by Top website
Slim Optimum

good

I have been meaning to write something like this on my website and you have given me an idea. Cheers.

Posted 03-Sep-2012 by Slim Optimum
Lipozene Reviews

thanks

I have been meaning to write something like this on my website and you have given me an idea. Cheers.

Posted 01-Nov-2012 by Lipozene Reviews
evaporator coil

rock

the last web part added to the page. This is in the order it was added, not loaded (see the Contents page to see the order).

Posted 15-Apr-2013 by evaporator coil
Childrens Golf Clubs

rock

This is in the order it was added, not loaded (see the Contents page to see the order).

Posted 16-Apr-2013 by Childrens Golf Clubs
Jewish Bar Mitzvah

rock

This is in the order it was added, not loaded (see the Contents page to see the order).

Posted 07-May-2013 by Jewish Bar Mitzvah
cam to cam sex

rock

This often requires a customized DVWP and a merged data source to get started.

Posted 11-May-2013 by cam to cam sex
san diego bankruptcy

hi

C'est le moment idéal pour faire quelques plans pour l'avenir et il est temps d'être heureux. J'ai lu ce post et si je pouvais, je veux vous suggérer des choses ou des suggestions intéressantes. Peut-être que vous pourriez écrire prochains articles faisant référence à cet article. Je veux lire plus de choses à ce sujet!

Posted 05-Jun-2013 by san diego bankruptcy
live sex

monu

Now you can access the ows object, see the examples in the comments of each method.

Posted 07-Jun-2013 by live sex
stryker recall

hi

It's gracefull to see what i was searching for. That's the material which I was searching about. The matter you've highlighted above is surely valueable for anyone to workout. the concept of your article is very true and It will result in a positive way.

Posted 18-Jun-2013 by stryker recall
wcool

COOL

. I like spring seeWe not seen by a director of the day. Drop out of school such as sharpening stone, not see damage on some of its losses. hotel in jaipur near railway station

Posted 03-Jul-2013 by wcool
business dissertation topics

business dissertation topics

I just read through the entire article of yours and it was quite good. This is a great article thanks for sharing this informative information.

Posted 03-Jul-2013 by business dissertation topics
spss assignment help

spss assignment help

Thank you, I have been searching for facts about this topic for ages and yours is the best I’ve discovered so far.At the same first, I would support a state of grace to this article illuminating.I prefer to ask me where I can learn a lot more information about testing.

Posted 03-Jul-2013 by spss assignment help
mercedes emblems

hi

This became truly very helpful site. I truly enjoyed what sort of written content had been published. I will be content to help save this web site in to our folder. Many thanks! The way you express yourself is awesome.Hey, your blog is great.

Posted 09-Jul-2013 by mercedes emblems
reverse mortgage lenders

hi

Lots of men look for required knowledge close to this good topic. So, that’s possible to find everything if you go to

Posted 11-Jul-2013 by reverse mortgage lenders
china wholesale

china tablet blogs

Thank you for sharing, looking for Chinese tablet, go to https://aussiepads.com.au/forum/14-tips-and-tricks/3026-taking-a-fabulous-a-blueprint-through-the-someone#3026

Posted 11-Jul-2013 by china wholesale
mesh recall

hi

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success.

Posted 19-Jul-2013 by mesh recall
dui lawyer san diego

hi

We value your time that is why we deliver online research paper service! Just visit this site and order professionally written essays online!

Posted 18-Nov-2013 by dui lawyer san diego
wansview

wansview

Thank you very much for you can share your post,wansview camera the article content written very well,extremely is worth my study.

Posted 23-Jan-2014 by wansview

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: