AnsweredAssumed Answered

Conditional FIlter portal setup

Question asked by ultranix on Sep 21, 2014
Latest reply on Sep 21, 2014 by philmodjunk


Conditional FIlter portal setup


Hey, I'm trying to setup conditional filter portal, i.e. I have two global fiels: PAY::xaction_type and PAY::xstatus and I want only those records to appear, that meet criteria corresponding to those fields.

I created a portal, which is based on Table OBJECT_Pay with filter calculation:

If (IsEmpty (PAY::xaction_type); OBJECTS::contract_action = "*"; OBJECTS::contract_action = PAY::xaction_type) &
If (IsEmpty (PAY::xstatus); OBJECTS::status = "*"; OBJECTS::status = PAY::xstatus)

But it doesn't work. My idea here would be if PAY::xaction_type (or PAY::xstatus) is empty, then it wouldn't filter by that field and show all records, and when either one or both fields have values, then it would filter by them. How do I achieve that?