如何向 PXSelect 中的 Where2 子句添加两个以上的 OR?

How can I add more than two ORs to a Where2 clause in a PXSelect?

我有一个使用 Where2 运算符的选择器。由于我需要两个嵌套的 WHERE,ORed 在一起 - 如下所示......我已经尝试添加它但我无法让它工作。我在想 Where2 只允许两个嵌套的 OR 条件:

Where2<  Where<  xvwProjects.usrContractEntityType, Equal<Constants.investor>,
         And<    xvwProjects.usrBranchID, Equal<Current<GLTran.branchID>>,
         And<    AssistantController.xTACOpenSourceDetail.accountLookup, Equal<Current<GLTran.accountID>>>>>,
Or<      Where<  xvwProjects.usrContractEntityType, Equal<Constants.investment>,
         And<    AssistantController.xTACOpenSourceDetail.accountLookup, Equal<Current<GLTran.accountID>>>>>>,...

以上工作正常。我的问题是,如何向其中添加另一个 OR 组,如下所示:

Where2<  Where<  xvwProjects.usrContractEntityType, Equal<Constants.investor>,
         And<    xvwProjects.usrBranchID, Equal<Current<GLTran.branchID>>,
         And<    AssistantController.xTACOpenSourceDetail.accountLookup, Equal<Current<GLTran.accountID>>>>>,
Or<      Where<  xvwProjects.usrContractEntityType, Equal<Constants.investment>,
         And<    AssistantController.xTACOpenSourceDetail.accountLookup,Equal<Current<GLTran.accountID>>>>>>, 
Or<      Where<xvwProjects.nonProject, Equal<True>>>,

或者,如果做不到,我应该使用哪个搜索(我目前正在使用 Search5,因为我需要一个连接、一个位置和一个聚合)?这是 BQL 无法完成的事情吗?格式是什么?

下面的语法可能有点不对,但您只需嵌套 Where2's。

Where2<  Where<  xvwProjects.usrContractEntityType, Equal<Constants.investor>,
         And<    xvwProjects.usrBranchID, Equal<Current<GLTran.branchID>>,
         And<    AssistantController.xTACOpenSourceDetail.accountLookup, Equal<Current<GLTran.accountID>>>>>,
Or<
        Where2<
             Where<  xvwProjects.usrContractEntityType, Equal<Constants.investment>,
             And<    AssistantController.xTACOpenSourceDetail.accountLookup,Equal<Current<GLTran.accountID>>>>>>, 
        Or<      Where<xvwProjects.nonProject, Equal<True>>>
        >,

由于 Or 条件意味着它们中的任何一个都将 return 为真,您基本上是在说“Where”。 Where 基本上在 SQL 中设置分组,所以您说的是 Where2