I have implemented a DataBean Automation Script for the "reorderpaddirect" DataBean in the Inventory application. I am implmenting a custom button handler logic for the "reorderpaddirect" dialog. In this DataBean script, I've defined a custom function that matches the mxevent specified on the custom button I've added.
I setup two Work Orders, each with two Tasks on which there are Planned Materials and have moved both Parent Work Orders to the default APPR status (the Task WOs all end up in WMATL status, as expected).
Now, in the Inventory application, when I Click the Select Action "Reorder Direct Issue Items/Svcs" Select Action, it brings up the Reorder Direct Issue Items and Servcies dialog, and then I click the Preview button and get the Reorder Items Detail dialog which uses the DataBean for which I've implement the DataBean Automation Script. In this dialog, we've added table columns for the related Work Order WOGROUP value; here I filter down the list to just those Parent WOs for which I've created planned materials (a total of 4 Planned Materials, as expected).
When I click my new custom button, my new Automation Script function is executing, as expected. In the script logic, I'm simply logging some information about the MboSet retrieved from the DataBean. Here I am logging some info about each of the MBOs in the MboSet as well as all of the various Where clauses that are configured on the MboSet (this is a REORDERPAD MboSet). I'm calling the following MboSet methods and logging the returned result:
getAppWhere(): returns None
getMaxAppsWhere(): returns None
getQbeWhere(): returns "exists (select 1 from dbo.workorder where ((wogroup like '214473_')) and (wonum=reorderpad.wonum and siteid=reorderpad.siteid))"
getUserWhere(): returns None
getWhere(): returns "(location is null and usrname= '<my userid>' and (mrnum is null or mrnum not in (select mrnum from dbo.reordermutex where type='MR'))) and orgid= 'KNCUSD' and siteid= 'OK01' and (reorderqty>0 or (reorderqty is null and orderqty is null and unitcost is null and linetype in (select value from synonymdomain where domainid='LINETYPE' and maxvalue in ('STDSERVICE','SERVICE'))) )"
hasQbe(): returns True
getQbe(): returns [] (empty array; the javadoc indicates this method returns String[][])
My question is, if there is a QBE Where clause, and if hasQbe() returns True, then why does getQbe() return an empty array? I'd expect there to be a non-empty String[][] returned.