02-05-2019 11:41 AM
I am attempting to locate documents using the built-in text searching capabilities (TextDataProvider.TextSearch) but am receiving the following exception:
"An error occurred within the Unity API: Required input parameter 'DocumentID' is missing for: TextSearch (Method: 'textSearch', Type: 'Hyland.Core.Unity.Services.DataProviderService, Hyland.Core.Unity, Version=17.0.1.75, Culture=neutral, PublicKeyToken=null'"
The code for retrieval is below:
var searchResult = _application.Core.Retrieval.Text.TextSearch(document.DefaultRenditionOfLatestRevision, "ERROR", TextSearchOptions.CaseSensitive);
The method signature doesn't give me anywhere to input a document ID, how do I avoid this exception?
02-05-2019 11:48 AM
Hi David --
I have a couple questions that may help us troubleshoot:
Best, AK
02-05-2019 11:48 AM
Hi David --
I have a couple questions that may help us troubleshoot:
Best, AK
02-05-2019 12:05 PM
Reading the content of the same text file works just fine using the code below:
using (var pageData = _application.Core .Retrieval.Text .GetDocument(document.DefaultRenditionOfLatestRevision)){ using (var reader = new StreamReader(pageData.Stream)) { textBox1.Text = reader.ReadToEnd(); }}
02-05-2019 12:12 PM
I may have misspoken, I apologize -- what I meant was, what is the origin of the document you're getting the DefaultRenditionofLatestRevision of? What is its default file format and document type? Can you pull back a positive non-zero int for document.ID?
03-12-2019 09:32 AM
Sorry for the delayed response... This is a verification report for a DIP import. I believe that means it's native format is text.
I'm trying to loop through verification reports for a particular DIP process and find any with errors in them. From that point I would be able to parse out information such as batch #, etc.
== edit ==
To clarify, the end goal is to do what I said above, in this instance I was just testing the text search portion of this against a verification report. Looping had not been implemented yet.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.