1

In BO XI 3.1, is it possible to create a condition object that filters on multiple tables, without adding all of those tables to the query if they weren't already present?

For example, if I have several tables which all contain both current and historical data, and each table has a flag to indicate if the record is current or historical - can I create a single "Current Data" condition that filters all of such tables to pull only current data? The catch would be that the query might not be selecting from all of these tables, and I don't want the inclusion of the condition to add joins to tables I'm not selecting from.

In other words, can a condition check which tables are being used by the query and apply filters only on those tables?

4

1 回答 1

0

您可以为这些表中的每一个添加一个自我限制连接,并使用一个@prompt函数来询问是返回当前数据还是返回历史数据。如果您对每个自限制连接中的所有提示使用相同的文本和相同的数据类型,则提示只会显示一次,并且只会应用于生成的查询中实际使用的表。

自限制连接可能类似​​于:

<table>.<history_flag> 
= @Prompt('Select current or historical data','A',{'C','H'}, Mono, constrained, , {'C'})

在上面的示例中,我们假设标志是一个字母数字列 ( A),其值为 C 或 H ( {'C','H'})。用户只能从这两个值constrained中进行选择 ( ),并且只能选择一个值 ( Mono)。默认选项设置为当前数据 ( {'C'})。

查看 @prompt 语法的 Universe Designer 指南。自限制连接在同一手册中进行了说明。

于 2014-01-07T21:51:40.807 回答