Skip to main content
Nintex Community Menu Bar

FilterService Find method

  • March 12, 2005
  • 4 replies
  • 22 views

Forum|alt.badge.img+1
I'm trying to filter on a Process Data field or Folio. I want the user to provide me a value (such as the document name) or Folio value and be able to get the Process Instance ID from that search in order to display the workflow status.

Below is my test code. Nothing is being returned in the dataset. What am I doing wrong?

string strXML = "<?xml version="1.0" encoding="utf-8" ?><Search><Criteria>CR-155</Criteria><Scope><Folio Search="True" /><Folder Search="False" /><ProcessName Search="False" /><ActivityName Search="False" /><EventName Search="False" /><ProcessData Search="True" /><ActivityData Search="True" /><Originator Search="False" /><Destination Search="False" /></Scope><Filter><DateFilter Filter="False"><FromDate /><ToDate /></DateFilter><ProcessFilter Filter="True"><Folder>ECM</Folder><Process>ECM</Process></ProcessFilter></Filter><Sort>Folio Asc</Sort></Search>";
System.Xml.XmlDocument findDoc = new System.Xml.XmlDocument();
findDoc.XmlResolver = null;
findDoc.LoadXml(strXML);

K2FilterService.FilterService wsK2 = new K2FilterService.FilterService();
wsK2.Credentials = new System.Net.NetworkCredential("username", "password", "domain");
System.Data.DataSet ds = wsK2.Find(findDoc, @"domainusername", 5);

4 replies

Forum|alt.badge.img+1
Nevermind. As soon as I changed the int param to 1 it worked.

Forum|alt.badge.img+13
  • Rookie
  • November 10, 2006
How do you filter on just a specific DataField using FilterSearch/Find?

It seems that the Criteria will look for any of the categories that you allow it to search and not on a specific DataField. If there are 2 datafields named:
FirstName and LastName and I want to get all LastName=YAO, I don't want the search to come back when FirstName=YAO.

Forum|alt.badge.img+5
  • March 6, 2007
Michelle,

I'm having the same issue as you. What param did you change to 1?

Forum|alt.badge.img+1
  • March 21, 2007
Hello,
The last one. (5)
This parameter is the PageNo (Page Number).

How do you know how many pages are there in the result?
I am doing the same find feature and want to build up correct paging.