Putting code in Drill down trigger then using default action

Hi, On our system we have a flow field on the sales line that auto drills down to a lot table… I want to put some processing code / function in the on drill down trigger and then run the default action. If i put any code in the section the default action does not run. The on line help states that the code inserted REPLACES the default action Has anyone here done any thing similar? Secondly… but on the same subject once the above mentioned function has returned its value, i want to be able to pass that value thru to the form that opens via the drill down, so that i can use the value as a filter Can anyone help me out here ! Bruce

You must launch form by c/al in triger. To set filter on launching form use groupfilter.

Can you give me an example ? here is the code i am trying to use. //added to check purchase spec IF (Type=Type::Item) THEN BEGIN item.GET(“No.”); No:=item.ProdinfoNo; Cust:=FORMAT(“Sell-to Customer No.”); FiltStr := AccessCheck.PurchSpec(Cust,No) END; //end of code to check Purch spec // Now apply the filter to the table and open the form LotTrans.SETFILTER(LotTrans.Type,’%1’,LotTrans.Type::Sale); LotTrans.SETFILTER(LotTrans.“Document Type”,’%1’,LotTrans.“Document Type”::Order); LotTrans.SETFILTER(LotTrans.“Document No.”,’%1’,“Document No.”); LotTrans.SETFILTER(LotTrans.“Line No.”,’%1’,“Line No.”); LotTrans.SETFILTER(“Lot No.”,’%1’,FiltStr); form.run(50050); This appears to run without error, but what happens is that the form seems to open first whilst the function runs. but the form holds all records ! Bruce

try form.run(50050, LotTrans); -jp

Professional sysntax ! table.setfilter(…) table.setfilter(…) … … FORM.RUNMODAL(FORM::“table Name”,table); :slight_smile:

table.setfilter(…) table.setfilter(…) table.filtergroup(2); //is the same as SourceTableView property //now user will not able reset filters … FORM.RUNMODAL(FORM::“table Name”,table); /*****************/ table.setfilter(…) table.setfilter(…) table.filtergroup(2); FORM.SETTABLEVIEW(table); … FORM.RUN(FORM::“table Name”); //works fine too Edited by - db on 3/10/00 4:50:18 PM

Thanks to all for your help on this i appear to have it working with one small exception. Filters !!! If I have one record returned by the original function eg 1234 it seems ok, it i try to use /1234 as a filter it doesn’t ssem to like it, can / only be used with a string in front of it ? Bruce

FORM.RUN(FORM::“table Name”); > //works fine too Just a comment. RUN and RUNMODAL are slightly different things.