Filters on a temporary table

Hi, maybe this is a dumb question [:I] (Google didn’t help anyway! [:D] ) How do filters work on a temporary table? I have a tabular form based upon a temporary table, I want to perform a task on some records according to the user’s choice. If I try to apply field filters or table filters, they actually seem to be applied - I can see them set in the filter windows and the word “FILTER” appears in the status bar, but the record showed in the form stay the same, which is confusing… [xx(] Thanks for any enlightment [:)] Anna

What do you mean by

quote:

I have a tabular form based upon a temporary table

[?] You can set temporary table to Yes only for variable not for SourceTable of a form. And why do you need to use temporary table in this case ?

It’s a small trick, Arthur. Check Form 344 Navigate, the SourceTable is “Document Entry” but there is a temporary record variable “DocEntry” representing that same table. And the OnFindRecord and OnNextRecord are responsible for the rest. Anna must have something similar. I also have something like this and have never figured out how or if it is possible for filters and the Find tool to work under this temp tables…

Ciao Anna, I just tested it in 3.70a. It works fine. Maybe you should restart your machine. /Karl

quote:

Ciao Anna, I just tested it in 3.70a. It works fine. Maybe you should restart your machine. /Karl
Originally posted by kadler - 2004 Sep 30 : 14:19:37

I’ve tried from an other machine (same database) and it didn’t. Which form did you test? I’m trying on form 99000883 “Sales Order Planning”. What I’m trying to achieve is to adapt Sales Order Planning to my customer’s needs without rewriting it all from scraps. [:P] Anna

Ciao Anna, Here is the code who I tested: c.reset; if c.find(’-’) then repeat tempc := c; tempc.insert; until c.next = 0; form.runmodal(0,tempc); c is rec 18, temp c is temp rec 18. /Karl

quote:

Ciao Anna, Here is the code who I tested: c.reset; if c.find(’-’) then repeat tempc := c; tempc.insert; until c.next = 0; form.runmodal(0,tempc); c is rec 18, temp c is temp rec 18. /Karl
Originally posted by kadler - 2004 Sep 30 : 17:12:49

Ciao, Karl! I’m afraid I’m missing something… this looks like code that builds the temporary table a then shows it on a form. I think that what I’m trying to do is a little different (maybe it just can’t be done, but why give up without trying?). My form is already built, showing a list of records. The user sets a filter on the listed records using the filter buttons as is it were a normal form. The filters are actually applied, but the form still shows all the record in the table. To better understand what I mean, you might try this: 1) open a sales order with more than a line 2) choose Order->Planning 3) on the planning form apply a filter which should leave only a line visible… 4) tell me what you see [:D] Thanks Anna

Hi Ana, The problem/error in the Form 99000883 Sales Order Planning is that they do a Assignment instead of an Copy change the line SalesPlanLine := Rec; to SalesPlanLine.COPY(Rec); in the OnFindRecord-Trigger and in the OnNextRecord-Trigger then it should work. br Josef Metz

quote:

Hi Ana, The problem/error in the Form 99000883 Sales Order Planning is that they do a Assignment instead of an Copy change the line SalesPlanLine := Rec; to SalesPlanLine.COPY(Rec); in the OnFindRecord-Trigger and in the OnNextRecord-Trigger then it should work. br Josef Metz
Originally posted by jm - 2004 Sep 30 : 17:51:50

GREAT! [:D][:D][:D][:D][:D] Anna

Thanks Josef, that was quite helpful for me too.

Tanks Josef, very helpful for me also.