Extending functionality of my matrix

The ongoing saga of my matrix… Thanks to the help from various posters on this forum, I now have a functioning matrix which lists each entry from the item table, and then shows, by shipment date, the average unit price for that item on the sales invoice line table. This basically works ok. Now however, I want to integrate this with my Sales Order and Sales Quote form, so that when a user selects a line, they can select an option from the line menu button and my matrix is displayed with the relevent prices. So far, I have created a user function on the Sales Invoice Line table, executed it from the menu button and this then displays my matrix, almost perfectly, apart from I can’t get it to just display the details for the current selected line on the order/quote. I’ve tried SETFILTER and SETRANGE within my user function on the Sales Invoice Line table, but I always get all items on the table. Any suggestions on what may be going amiss? Thanks in anticipation

Hi Skippy, Create a function on the subform: ShowMyMatrix() IF Item.GET("No.") THEN BEGIN Item.SETRECFILTER; CLEAR(MyMatrixForm); MyMatrixForm.SETTABLEVIEW(Item); MyMatrixForm.RUNMODAL; END; and call it from the Line Menu CurrForm.SalesLines.FORM.ShowMyMatrix(); Next thing - I’m sure - you’ll want it to start displaying at the posting date and work like a lookupform? [:D]

Hi SV I’ve just got round to trying out your code and it worked first time, thank you very much. “Next thing - I’m sure - you’ll want it to start displaying at the posting date and work like a lookupform?” What I’d actually like it to do is work from the posting date minus 4 weeks. Be interested to see your suggestions on that and lookups Thanks again for your help so far