c# - Acumatica - BQL 选择等于字符串的表字段
问题描述
我想在我的 SQL 表中选择与我的代码中指定的测试字符串相等的任何字段。我看过这篇文章:Translate SQL to BQL in Acumatica然而,这是通过不可变的常量完成的。理想情况下,我想通过组合框更改字符串。这就是我所拥有的:
public class TestOverview : PXGraph<TestOverview, TestOverview.MasterTable>
{
string test = "USA"
public PXSelect<DemoCustomerBreakdown,
Where<DemoCustomerBreakdown.countryRegion,
Equal<"I would like my string to go here">> CustomerCountry;
}
任何想法如何在不使用常量类的情况下实现这一目标?谢谢
解决方案
如果您想将此视图绑定到表单视图,则常量是您唯一的选择。另一方面,如果您想使用此视图从代码中选择数据,则可以使用 Required<> 操作数,然后在您从此视图中选择时传递字符串:
PXSelect<DemoCustomerBreakdown,
Where<DemoCustomerBreakdown.countryRegion,
Equal<Required<DemoCustomerBreakdown.countryRegion>>> CustomerCountry;
var results = CustomerCountry.Select(this, “My string”);
推荐阅读
- java - Java,尝试根据命令长度创建特定的网络字节头
- intellij-idea - IntelliJ IDEA 快捷键切换2个字
- python - 当我使用 .append 时,MongoDB 每次第二次插入 null
- python - 无法正确下载嵌套表[编辑]
- python - 舍入Series中的值时出现decimal.InvalidOperation错误
- perl - 我使用 LWP::UserAgent 使用 cookie 有什么问题?
- c# - 可编辑组合框无上下文菜单
- regex - 忽略 Powershell RegEx 上的换行符
- vba - 文件重命名期间的 vba 运行时错误 75
- c# - 如何使用 web api 保存图片?