自动生成 Code 之外的属性值 (Master Data Services)Automatically Generate Attribute Values Other Than Code (Master Data Services)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - 仅限 Windows 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - Windows only 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance

Master Data ServicesMaster Data Services中,当希望在每次应用业务规则时自动分配一个整数作为值时,自动为实体的属性值生成值。In Master Data ServicesMaster Data Services, automatically generate values for an entity's attribute values when you want an integer to be automatically assigned as the value each time business rules are applied.

先决条件Prerequisites

若要执行此过程:To perform this procedure:

自动生成属性值To automatically generate an attribute value

  1. 主数据管理器Master Data Manager中,单击 “系统管理”In 主数据管理器Master Data Manager, click System Administration.

  2. 从菜单栏中,指向 “管理” ,然后单击 “业务规则”From the menu bar, point to Manage and click Business Rules.

  3. “业务规则维护” 页上,从 “模型” 列表中,选择某一模型。On the Business Rule Maintenance page, from the Model list, select a model.

  4. “实体” 列表中,选择某一实体。From the Entity list, select an entity.

  5. “成员类型” 列表中,为要应用于的业务规则选择成员类型。From the Member Type list, select a type of member for the business rule to apply to.

  6. “属性” 列表中,保留默认值 “全部”From the Attribute list, leave the default of All.

  7. 单击 “添加业务规则”Click Add business rule.

  8. 单击 “编辑所选业务规则”Click Edit selected business rule.

  9. “组件” 窗格中,展开 “操作” 节点。In the Components pane, expand the Actions node.

  10. 在“默认值”节点中,单击“默认为生成的值”并将其拖到“THEN”窗格的“操作”标签。In the Default Value node, click defaults to a generated value and drag it to the THEN pane's Actions label.

  11. “属性” 窗格中,单击要生成其值的属性并将其拖到 “编辑操作” 窗格的 “选择属性” 标签。In the Attributes pane, click the attribute with the value you want to generated and drag it to the Edit Action pane's Select attribute label.

  12. “起始”“增量” 框中键入值。Type a value in the Start with and Increment by boxes. 如果成员已存在,则将基于最大的现有值设置值。If members already exist, the value will be set based on the highest existing value. 例如,如果最大的现有值为 299 并且将“增量”设置为“1”,则下一个成员的值将设置为 300。For example, if the highest existing value is 299 and you set Increment by to 1, the next member's value will be set to 300.

  13. “编辑操作” 窗格中,单击 “保存项”In the Edit Action pane, click Save item.

  14. 单击 “上一步”Click Back.

  15. 或者,在“业务规则维护”页上,对于包含业务规则的行,双击“名称”、“说明”或“通知”列中的单元以便更新值。Optionally, on the Business Rules Maintenance page, for the row that contains your business rule, double-click a cell in the Name, Description, or Notification column to update the value.

  16. 单击 “发布业务规则”Click Publish business rules.

  17. 在确认对话框中,单击 “确定”On the confirmation dialog box, click OK. 规则的状态将更改为 “活动”The rule's status changes to Active.

后续步骤Next Steps

另请参阅See Also

自动创建代码 (Master Data Services) Automatic Code Creation (Master Data Services)
业务规则 (Master Data Services) Business Rules (Master Data Services)
验证 (Master Data Services)Validation (Master Data Services)