Message Boards

Need help from a creative Browse writer

Charlie Englesberg, modified 3 Years ago.

Need help from a creative Browse writer

Post Date: 9/11/18 (Bronze, 16 Posts) Recent Posts

Trying to build a simple browse joining the pt_mstr and ro_det tables.  The wrinkle is that I only want rows to appear in results set if demand exists for Part Number in mrp_det table.  Joining mrp_det table is not an option because I do not want a separate row for each mrp_det record.  I tried using a browse filter the used the Progress CAN-FIND function (ie CAN-FIND(mrp_det where mrp_domain = pt_domain and mrp_part = pt_part and mrp_type = "DEMAND").  This resulted in the following error message. CAN-FIND is invalid within an OPEN QUERY (3541).

Does anyone have any thoughts or suggestions?

thumbnail
Xavier Pechadre, modified 7 Years ago.

Re: Need help from a creative Browse writer

Post Date: 9/11/18 (Silver, 70 Posts) Recent Posts

Hello,

Even you don't use mrp_det table, add this table to your browse if you want to use a filter on this table. Without link with the others tables.

Best regards

Charlie Englesberg, modified 7 Years ago.

Re: Need help from a creative Browse writer

Post Date: 9/11/18 (Bronze, 16 Posts) Recent Posts
Thanks for response Xavier.  But it is unclear to me how that would help me filter out records that have no MRP demand.
thumbnail
Xavier Pechadre, modified 7 Years ago.

Re: Need help from a creative Browse writer

Post Date: 9/11/18 (Silver, 70 Posts) Recent Posts

Ok, to do that as you want, i think you must use pre-processor commands to record your query in temp table (i use qad_wkfl with qad_key1 = name of browse, and in a post-processor commands delete qad_wkfl where qad_key1 = name of browse. Make your browse on qad_wkfl where qad_key1 = name of browse.  

I hope it's useful.

Best regards

Evan Bishop, modified 7 Years ago.

Re: Need help from a creative Browse writer

Post Date: 9/11/18 (Gold, 132 Posts) Recent Posts
Hi Charlie. I think the best way to address this is to create a local variable column in your browse as a logical field, label it "MRP Demand" or something similar and put your "can-find (first mrp_det" logic into the definition of that local variable. Then you can filter on that column as a user filter "MRP Demand = yes" to limit the results only to items that have demand. It's not as efficient as having a filter in the primary query since it will have to filter the results after they've been retrieved but is better than trying to use qad_wkfl in a pre-processor which will lead to other problems. The user can set the filter as identified above and then save the browse as a favorite to have it default that way when they launch it. 
Charlie Englesberg, modified 7 Years ago.

Re: Need help from a creative Browse writer

Post Date: 9/12/18 (Bronze, 16 Posts) Recent Posts
Not the optimum solution , but IT WORKS.  Actually runs pretty quickly too..  Really do appreciate the help Evan.   Thanks.
John Ruch, modified 7 Years ago.

Re: Need help from a creative Browse writer

Post Date: 9/12/18 (Silver, 64 Posts) Recent Posts
An alternative to using a pre-processor is to run a cron job and save values in usrw_wkfl or an available user field. This approach can make aggregate usage and demand metrics accessable in simple browses. 
thumbnail
Mark Garnett, modified 7 Years ago.

Re: Need help from a creative Browse writer

Post Date: 10/4/18 (Bronze, 12 Posts) Recent Posts

I have needed to the same previously, the only table available that summarises if there is demand for an item is Inventory Master (in_mstr).

Look for Qty Required (in_qty_req > 0), you will actually get one record per site, but if you think about it you would want that (use a run-time filter if only interested in one site). 

This field is a nice summary of all known requirments for the item/site, so includes sales orders and work order (component) demand summed together.

Regards, Mark

 

Message place holder