Page 1 of 1

LOOK UP Tables - FILTERING ACTIVE PRODUCTS

Posted: Wed Jan 17, 2018 6:27 am
by comercialr4

Hi There

I have 2 tables : Products and Orders
In Products table I have a field named ACTIVE, in order to select only products that are still in use...

In CHILD LOOK UP fields I´m using the field ACTIVE in FILTER. If ACTIVE = 1, it should list all products, if ACTIVE = 0, then should not apear...
It works, but all orders that have products with ACTIVE =0, in LIST panel does not apear the product name anymore, but its ID instead...

How sould I fix it?
I want :

  1. In LIST panel, product name should apear even if ACTIVE = 0;
  2. In ADD panel, product name should apear only if ACTIVE = 1;

Any Idea?
Is it possible to arrange in cascade mode?


Re: LOOK UP Tables - FILTERING ACTIVE PRODUCTS

Posted: Wed Jan 17, 2018 11:12 am
by arbei

Put your filter in Lookup_Filtering Server Event conditionally with the CurrentPageID();

For example:
if ($fld->FldName == "<Field>"){
if (CurrentPageID() == "add")
ew_AddFilter($filter, "<Condition>");
}