Ax Query 条件过滤

“交”条件查询

不同字段

 精确

queryExpression = '(InventTable.ItemName == "座") && (InventTable.ItemGroupID == "10")';
qbds.addRange(fieldnum(InventTable, ItemId)).value(queryExpression);
 

 模糊

queryExpression = '(InventTable.ItemGroupID == "10")';

qbds.addRange(fieldnum(InventTable, ItemId)).value(queryExpression);

qbds.addRange(fieldnum(InventTable, ItemName)).value("*座*"); 

相同字段

qbds.addRange(fieldnum(InventTable, ItemName)).value("c*001"); 

ItemId like 'c*'   and itemid like '*001' 

“并”条件查询

不同字段

精确

    queryExpression = '(InventTable.ItemGroupID == "20") ||(ItemName == "座")';
    qbds.addRange(fieldnum(InventTable, ItemId)).value(queryExpression);

模糊

    可能没有直接的办法实现 

相同字段

精确

    queryExpression = '20,10';
    qbds.addRange(fieldnum(InventTable, ItemGroupId)).value(queryExpression);

模糊

    queryExpression = '*座,00*';
    qbds.addRange(fieldnum(InventTable, ItemId)).value(queryExpression); 

posted @ 2019-06-11 10:58  学习是进步的阶梯  阅读(301)  评论(0编辑  收藏  举报