operator-keyword - Acumatica 在 BQL 中将 In <> 运算符用于整数
问题描述
我们正在尝试IN
在 BQL 上使用运算符来选择多个库存,但它不起作用。例如,
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 。我们正在以类似的方式尝试整数类型。我不确定我们缺少什么。如果有人可以帮助识别,那就太好了。
解决方案
Acumatica ORM 实体数据库类型都可以为空。您正在使用一个不可为空值的数组“int []”,而不是一个可以为空值的数组“int?[]”。
代码:
int?[] items = new int?[] { 154, 184 };
foreach (SOLine item in PXSelect<SOLine,
Where<SOLine.inventoryID,
In<Required<SOLine.inventoryID>>>>.Select(this, items))
{
}
推荐阅读
- javascript - 在 IE11 中获取“标题未定义”
- c# - Razor 会话数据 - HttpContextAccessor 为空
- javascript - 刷新后保持折叠状态
- ios - ios swift UICollectionVIew 问题:未定义 UICollectionViewFlowLayout 的行为,因为
- jquery - 如何刷新复选框以反映 UI 上的更改?
- php - 当数据库(MySQL)表更改(插入、更新、删除)发生时,如何在颤动中获取推送通知?
- c++ - 调用 std::filesystem::copy() 时可能返回的错误代码是什么?
- vba - 激活按钮时,VBA将数据从多个activex控件移动到sheet2
- android - 有没有办法录制音频并在点击时开始收听,存储在我们的本地机器上并将其从语音转换为文本?
- javascript - 如何使用 javascript 中的 add 方法从数组创建选项列表?