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);
+1
Nevermind. As soon as I changed the int param to 1 it worked.
+13
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.
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.
+5
Michelle,
I'm having the same issue as you. What param did you change to 1?
I'm having the same issue as you. What param did you change to 1?
+1
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.
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.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.