【问题标题】:Acumatica - BQL Select table field where equals stringAcumatica - BQL 选择等于字符串的表字段
【发布时间】:2021-02-20 22:50:01
【问题描述】:

我想在我的 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;
  }

有什么想法可以在不使用常量类的情况下实现这一目标吗?谢谢

【问题讨论】:

    标签: c# acumatica


    【解决方案1】:

    如果您想将此视图绑定到表单视图,则常量是您唯一的选择。另一方面,如果您想使用此视图从代码中选择数据,则可以使用 Required 操作数,然后在您从此视图中选择时传递字符串:

     PXSelect<DemoCustomerBreakdown, 
       Where<DemoCustomerBreakdown.countryRegion,
       Equal<Required<DemoCustomerBreakdown.countryRegion>>> CustomerCountry;
    
     var results = CustomerCountry.Select(this, “My string”);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多