UPDATE Alex’s reply below links to an erp-function way of pumping the parameters to the baq, and so long as you only set the dataview (Ep Binding) and not the BAQ ID in the grid model/provider model then the troublesome param popups stay away
I’m tired of BAQs loading thousands of rows to the client to have it pick out the single row it needs there. Just about decided to only use BOs as they at least server side filter, but then they return too many columns, and don’t do the groupings, aggregations and calculations I might need. Many of our users will be across the Pacific and half the USA from our server here in NZ, so pumping large amounts of unwanted response data is especially undesirable.
So…
What if…
We allocate a single UD table to act as the the conduit to pass all “parameters” to all BAQs?
I have a spare UD table, UD05. My first BAQ I am testing it with is to be called from Customer Entry and its derivatives, so I’m want to filter within the BAQ down to a particular customer. Here’s my plan:
Filter UD05 to select the parameter I want (its value in this case is in Number01):
Join my query to it:
I will use 4 keys to identify a row in UD05 where I am passing the parameter.
Key1: The name of the BAQ this parameter is intended for.
Key2: The name of the parameter (in case i am passing multiple parameters)
Key3 and Key4 are the current UserID and WorkstationID to uniquify things and prevent collisions. (SessionID would have been nicer but can’t seem to access it as a special constant, but I think the userid/workstaionID should be sufficient to avoid parameter collisions between concurrent calls).
(I might rejig this and move BAQ name to to key 4 and the existing keys 2-4 up one, so that the BAQ name is optional- often have several BAQs firing in sequence all filtered off the same “parameter value(s)”, would be better then to set it once)
On the app studio side, before i call the baq-get, I will update-or-insert based on the 4 keys, and update in this case the Number01 field to the CustNum I require data for, and post and then I’m good to go and update from the baq(s).
Optionally at the end could delete the added row but probably not really necessary… UD05 will grow but not super fast and at least have some traceback, and can schedule it to be emptied weekly or something.
So… is this a silly idea?
Anyway, the UD05 table is set to go, the baq looks to be working as expected ( I can manually populate UD05 with a suitable “key” to return a CustNum) , but I have fallen at the first hurdle in application studio: I cannot link a dataview to my UD table, and haven’t managed to find any examples here of it being done. Here’s what i have tried, but no columns appear:
I was planning on doing this to my UD05 dataview:
- a row-find
- then either a row-add or a row-update,
- then a data-commit
then my baq-get.
Or maybe I can skip the dataview and do it with a rest-erp call? something like…
Feel like I might have gone down a rabbithole, I’m getting way out of my depth here…