开发者

Complex datasource issue in Dynamics AX

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
开发者_Go百科exists join tableChild where projectId = MyProjectId OR
exists join tableChild where parentProjectId = MyProjectId

How would someone address this issue?


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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜