Enovia MatrixOne Expression Objects

Expression Objects

Using MQL, expressions can be created and saved in the database to be evaluated against a business object, a connection, or from within a webreport, against a collection of business objects or connections. Once created, saved expressions can be referenced by name in a business object or connection select clause. Since select clauses can be embedded in expressions, they can be used in where clauses and access filters as well. Expression objects can also be referenced by name in webreports.

 

If-Then-Else

if EXPRESSION1 then EXPRESSION2 else EXPRESSION3

eval expr' if (attribute[Actual Weight] > attribute[Target Weight]) then ("OVER") else ("OK")' on bus 'Body Panel' 610210 0;

 

Substring

substring FIRST_CHAR LAST_CHAR EXPRESSION

eval expression 'substring -4 -1 attribute[Phone Number]' on bus Vendor 'XYZ Co.' 0;

 

Dateperiod

add expr QuarterlyDeliverables value 'dateperiod fq07 attribute[DueDate]';

 

Using Dates in Expressions

evaluate expr '(MX_CURRENT_TIME - state[Released].actual) / 3600' on bus 'Body Panel' 610210 0;

 

Count sum maximum minimum average median standarddeviation correlation

eval expr 'count TRUE' on temp query bus 'Body Panel' * *;

add expr LowCost value 'attribute[cost]>=10 AND attribute[cost]<=50';
eval expr 'count expression[LowCost]' on set NewBooks;

 

Example

evaluate expression "(average (state[Test].actual - state[Open].actual) )/ (3600 * 24)" on expand Product XYZ v7.0 to relationship Committed, Candidate, Proposed type Feature where "current == Test or current == Closed" on expand Product XYZ v7.1 to relationship Committed, Candidate, Proposed type Feature where "current == Test or current == Closed" dump "|";

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值