hi All,
i have one small doubt in copyfilters. I have 2 dataitems namely Vendor and Purch. Rcpt Line(Indented under Vendor). I made one Variable PurchRcptLine and i want to use that in vendor OnAfterGetRecord(). But i want that it should take all the filters which user give at the request form on Purch. Rcpt Line tab. So i used, PurchRcptLine.copyfilters(Purch. Rcpt Line).
IS that ok? for me i think its not working that why i put this query here?
0
Comments
try this:
Regards
I tried to copyfilters on On PreDataitem(first Dataitem) or OnAfterGetrecord(first Dataitem) but thr its not working.
Lets say i have Vendor as my first dataitem and Purch Lines as indented Dataitem. i made one variable PurchLine. at the onPreDataItem of vendor if i write PurchLine.copyfilters(Purch Line) than i am getting nothing.
1. If you set a filter by code on a dataitem before the onpredataitem trigger of that dataitem, the filters will be lost (as einstein said, the variable is re-initialized at "onpredataitem time")
2. You can probably copy the filters of the dataitemlink property by using filtergroup(4), but i've never tried it...i wonder if it works, it should :whistle:
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
i don't have time to try, but probably code like this should work, as filtergroups should isolate the filters: :-k
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
when i am using filtergroup(4) it does remove all filters like if i say just.
onprereport trigger
a.copyfilters(b);
i got filters
filtergroup(4);
a.copyfilters(b); after this nothing..
yes it's working when i checked it on onpredataitem trigger of under indented dataitem.
but it's giving only dataitemlink filters even i have assign other filters at run time(before preivew).
i think it does work only for dataitemlink filters..
Sorry guys for just posting my thoughts without checking them...i'm as curious as busy up to now
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
This code should be placed in the OnPreDataItem of "Purch. Rcpt. Line".