B
bshea
I have a desire to query Sharepoint from an Infopath form to determine the
number of items currently in a form library.
I have created a "request data" data connection called "Count New" which
points to my site, the the "New Requests" library, and gets the ID field. It
is setup to automatically retrieve data when form is opened.
From this point I had hoped to use:
function CountNewRequests()
{
// Counts the current New Requests
var inNewCount;
var obNewList;
// Get data from Data Connection
obNewList = XDocument.DataAdapters("Count New").QueryAdapater;
inNewCount = obNewList.Count();
return inNewCount;
}
When I do, the obNewList errors out with an "Object Null or Undefined"
message. I believe my next line is not correct either but I can't test that
until I get the correct return from my query.
Any thoughts on the error, or better on how to get the count of items in my
sharepoint library?
Thanks for any pointers you can give!
number of items currently in a form library.
I have created a "request data" data connection called "Count New" which
points to my site, the the "New Requests" library, and gets the ID field. It
is setup to automatically retrieve data when form is opened.
From this point I had hoped to use:
function CountNewRequests()
{
// Counts the current New Requests
var inNewCount;
var obNewList;
// Get data from Data Connection
obNewList = XDocument.DataAdapters("Count New").QueryAdapater;
inNewCount = obNewList.Count();
return inNewCount;
}
When I do, the obNewList errors out with an "Object Null or Undefined"
message. I believe my next line is not correct either but I can't test that
until I get the correct return from my query.
Any thoughts on the error, or better on how to get the count of items in my
sharepoint library?
Thanks for any pointers you can give!