[英]Create a business rule in MDM 2012 that tests the Sum of attributes of an entity
I have created an entity on MDM 2012 and I like to create a business rule that tests if the SUM of 3 attributes is 100. 我在MDM 2012上创建了一个实体,我想创建一个业务规则来测试3个属性的SUM是否为100。
I didn't find a way on the Action Panel to use arithmetic operators or simply a SUM function. 我没有在操作面板上找到使用算术运算符或仅使用SUM函数的方法。
Not sure we can perform this directly or not but yes we can use custom user defined script to validate Sum of attribute values=100 or anything 不确定是否可以直接执行此操作,但是可以使用自定义用户定义脚本来验证属性值之和= 100或任何其他值
try follow these steps - 请尝试按照以下步骤操作-
Step#1 Creating a business rule with custom extensions in MDS; 步骤#1在MDS中创建具有自定义扩展名的业务规则; for that create a user define function in SQL to validate sum of 3 or 4 parameter is 100 or not
为此,在SQL中创建用户定义函数以验证3或4参数的总和是否为100
make sure function created under USR schema and RETURNS BIT 确保在USR模式下创建函数并返回位
Step #2 第2步
Create Business Rule & select function created in step#1 as Operator 创建业务规则并在步骤1中创建选择功能作为操作员
Make sure to click somewhere inside the parameter box. 确保单击参数框内的某个位置。 This will change the layout and allow you to assign an attribute to the parameter of the user defined script.
这将更改布局,并允许您将属性分配给用户定义脚本的参数。
Step #3 What to do if condition met or not met 步骤#3如果满足或不满足条件该怎么办
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.