Acumatica - BQL Select table 字段等于字符串
Acumatica - BQL Select table field where equals string
我想 select 我的 SQL table 中与代码中指定的测试字符串相同的任何字段。我看过这个 post: Translate SQL to BQL in Acumatica 但是,这是通过常量 immutable 完成的。理想情况下,我想通过组合框更改字符串。这是我的:
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;
}
关于如何在不使用常量的情况下实现此目的的任何想法 class?谢谢
如果您想将此视图绑定到表单视图,常量是您唯一的选择。另一方面,如果您想将此视图用于代码中的 select 数据,则可以使用 Required<> 操作数,然后在从此视图中 select 时传递字符串:
PXSelect<DemoCustomerBreakdown,
Where<DemoCustomerBreakdown.countryRegion,
Equal<Required<DemoCustomerBreakdown.countryRegion>>> CustomerCountry;
var results = CustomerCountry.Select(this, “My string”);
我想 select 我的 SQL table 中与代码中指定的测试字符串相同的任何字段。我看过这个 post: Translate SQL to BQL in Acumatica 但是,这是通过常量 immutable 完成的。理想情况下,我想通过组合框更改字符串。这是我的:
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;
}
关于如何在不使用常量的情况下实现此目的的任何想法 class?谢谢
如果您想将此视图绑定到表单视图,常量是您唯一的选择。另一方面,如果您想将此视图用于代码中的 select 数据,则可以使用 Required<> 操作数,然后在从此视图中 select 时传递字符串:
PXSelect<DemoCustomerBreakdown,
Where<DemoCustomerBreakdown.countryRegion,
Equal<Required<DemoCustomerBreakdown.countryRegion>>> CustomerCountry;
var results = CustomerCountry.Select(this, “My string”);