Filtergroup behaviour

PtaPta Member Posts: 25
Hi everybody,

I recently wrote a lookup to the item list. When the list shows up everything seems to be ok. But, it seems that my filtergroup has no effect since pressing the "show all" button removes my filter. Code looks like this

Item.FILTERGROUP(2);
Item.SETRANGE("No.",XXX);
ItemList.LOOKUPMODE(TRUE);
ItemList.SETTABLEVIEW(Item);
Item.FILTERGROUP(0);
IF ItemList.RUNMODAL IN [ACTION::OK, ACTION::LookupOK] THEN
BEGIN
ItemList.GETRECORD(Item);
ItemNo := Item."No.";
END;

The filter does not show up in the bottom left corner but I can see it when pressing the table filter button. Any ideas?

Comments

  • kapamaroukapamarou Member Posts: 1,152
    Can you try the following?

    Item.FILTERGROUP(0); //This Before the .SETTABLEVIEW
    ItemList.SETTABLEVIEW(Item);
  • PtaPta Member Posts: 25
    That seems to be the correct way to do it. Thanx!
Sign In or Register to comment.