LOOK UP Tables - FILTERING ACTIVE PRODUCTS

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
comercialr4
User
Posts: 35

LOOK UP Tables - FILTERING ACTIVE PRODUCTS

Post 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?


arbei
User
Posts: 9286

Post 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>");
}


Post Reply