ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: atmaneuler on October 22, 2020, 02:23:31 pm

Title: Can 02 Filter arrays use mode "OR"?
Post by: atmaneuler on October 22, 2020, 02:23:31 pm
I have 2 filterRules arrays:
Code: [Select]
    filterRules1 = [
      { dataIndx: dataIndx_wh, condition: 'great', value: 0 },
      { dataIndx: dataIndx_ass, condition: 'equal', value: 0 },
    ];

    filterRules2 = [
      { dataIndx: dataIndx_ass, condition: 'great', value: 0 },
      { dataIndx: dataIndx_sf, condition: 'equal', value: 0 },
      { dataIndx: dataIndx_sew, condition: 'equal', value: 0 },
    ];

Could I have filter: [filterRules1] OR [filterRules2]??

I try the below code is not work:
Code: [Select]
this.grid.filter({
      oper: 'replace',
      rules: [
        filterRules1,
        filterRules2,
      ],
    });
Title: Re: Can 02 Filter arrays use mode "OR"?
Post by: paramvir on October 23, 2020, 10:26:15 am
I'm afraid filter API doesn't work this way.

filterRules1 can be applied to one column, filterRules2 to another and then they can be combined with "OR" or "AND"
Title: Re: Can 02 Filter arrays use mode "OR"?
Post by: atmaneuler on October 23, 2020, 11:36:40 am
Thank you for reply