Dynamics AX 中的复杂数据源问题

发布于 2024-09-15 02:12:35 字数 564 浏览 5 评论 0原文

我有一个显示表格中的行的网格。现在,我有这两个要求:

  1. 仅显示包含“小时”字段中的值的行。 “小时”字段是数组类型。
  2. 显示项目及其子项目中的行

我的问题是这样的:为了满足要求#1,我需要在数据源中使用 select 语句,因为我无法使用 QueryBuildDataSource 访问数组值(这是已知的 Dynamics AX 中的限制)。

但为了满足要求#2,我需要有两个“存在连接”,而这在 Dynamics AX 中是不可能的。例如,以下代码将不起作用:

select from table where
exists join tableChild where projectId = MyProjectId OR
exists join tableChild where parentProjectId = MyProjectId

有人会如何解决这个问题?

I have a grid that displays lines from a table. Now, I have these two requirements:

  1. Show only the lines that contains values in the "hour" fields. The "hour" field is an array type.
  2. Show the lines from a project and its subproject

My problem is this: to meet requirement #1, I need to use a select statement in my datasource since I cannot access array value using QueryBuildDataSource (this is a known limitation in Dynamics AX).

But to meet requirements #2 I need to have two "exists join", and this is not possible in Dynamics AX. For example the following code would not work:

select from table where
exists join tableChild where projectId = MyProjectId OR
exists join tableChild where parentProjectId = MyProjectId

How would someone address this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼角的笑意。 2024-09-22 02:12:35

从您提供的 select 语句示例来看,似乎没有必要有两个存在连接。对于其 where 子句中的两个可能条件,使用“OR”的单个存在连接可能就足够了,当然,表和 tableChild 之间仍应具有某种关系,以使连接具有逻辑意义。

select from table
exists join tableChild
where (tableChild.projectId = MyProjectId || tableChild.parentProjectId = MyProjectId)

From the select statement example you provided, it appears it may not be necessary to have two exist joins. A single exists join with the "OR" for the two possible conditions in its where clauses may be sufficient, of course, you should still have some relationship between table and tableChild for the join to make logical sense.

select from table
exists join tableChild
where (tableChild.projectId = MyProjectId || tableChild.parentProjectId = MyProjectId)
爱你不解释 2024-09-22 02:12:35

您可以使用 fieldID2Ext 函数在提供字段 ID 的查询范围中使用数组值。

您可以构建视图并在其上应用配置。

You can use array values in query ranges providing field IDs using fieldID2Ext function.

You can build view and apply confitions on top of it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文