cancel
Showing results for 
Search instead for 
Did you mean: 

mzSetQueryKeyword and Binary Operator for CustomQuery

Carl_Vincent
Confirmed Champ
Confirmed Champ

Hi guys, 

I need to run a Custom query behind ths scene with OnBase API.

I need to do an OR operation for the same KW into mzSetQueryKeyword If I call it 2 times it will be an OR or an AND ?

Like 

myapp.mzSetQueryKeyword(qryHdl,"VendorID",1, MZ_EQUAL)

myapp.mzSetQueryKeyword(qryHdl,"VendorID",2, MZ_EQUAL)

It will find VendorID 1 AND 2 or 1 OR 2

Thanks

1 ACCEPTED ANSWER

Tyler_Sorber
Star Collaborator
Star Collaborator

Hi Carl

Unfortunately, there is not a way to perform OR Operators within the Thick Client API.  As a workaround, you can perform multiple DocumentQueries to emulate the OR Functionality. 

View answer in original post

6 REPLIES 6

Tyler_Sorber
Star Collaborator
Star Collaborator

Hi Carl

Unfortunately, there is not a way to perform OR Operators within the Thick Client API.  As a workaround, you can perform multiple DocumentQueries to emulate the OR Functionality. 

Ok but I need to do a lot of Execute ? Which will prompt a lot of OnBase Windows (using MZ_OnBase) ?

If I want to prompt to user a Thick Client window with all Documents into it it impossible right ?

In the case of the Thick Client API, it would not be possible to display all Documents in the system. It is possible to utilize OR functionality within the Unity API. The example above is in regards to the Unity Client Automation API, which is not an equal representation; I would recommend looking into the use of the DocumentQuery Object within the Unity API in the OnBase SDK.

Additionally, I would highly recommend against returning all Documents in a System within a Single query, regardless of the API. This will utilize a large amount of resources to complete the query based on the number of documents returned; in short, it will not be performant and have a high possibility to cause further issues. It is recommended to utilize constraints to limit the amount of results that are returned to just the Documents needed.

Ahh no I don't want to show all documents. I have some "Link" generated from our LOB application and I want to show all the document related to one specific document (maybe with an System Task). I'll call a Stored Proc for retreive our "LOB Unique ID" keyword for all doc related to this one and execute a Query to show them. After that the user will select all results documents and send them by mail to an external person.