【问题标题】:Acumatica using In <> Operator in BQL for integerAcumatica 在 BQL 中将 In <> 运算符用于整数
【发布时间】:2018-09-21 22:57:08
【问题描述】:

我们正在尝试在 BQL 上使用 IN 运算符来选择多个库存,但它不起作用。 例如,

   int[] items = new int[] { 154, 184 };
   foreach (SOLine item in PXSelect<SOLine,Where<SOLine.inventoryID,In<Required<SOLine.inventoryID>>>>.Select(this, items))
    {

    }

我还参考了下面的博客,该博客说明了将 IN 运算符用于字符串: https://asiablog.acumatica.com/2017/11/sql-in-operator-in-bql.html。我们正在以类似的方式尝试整数类型。我不确定我们缺少什么。如果有人可以帮助识别,那就太好了。

【问题讨论】:

    标签: operator-keyword acumatica


    【解决方案1】:

    Acumatica ORM 实体 DB 类型都可以为空。您正在使用一个不可为空值的数组“int[]”,而不是一个可空值的数组“int?[]”。

    代码:

    int?[] items = new int?[] { 154, 184 };
    
    foreach (SOLine item in PXSelect<SOLine, 
                            Where<SOLine.inventoryID, 
                            In<Required<SOLine.inventoryID>>>>.Select(this, items))
    {
    
    }
    

    【讨论】:

    • 非常感谢。它现在根据您的解决方案工作。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-11
    • 2022-12-15
    • 1970-01-01
    • 1970-01-01
    • 2012-12-15
    相关资源
    最近更新 更多