自动创建代码 (Master Data Services)Automatic Code Creation (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中,可以为 Code 属性或任何其他数值属性自动生成数值。In Master Data ServicesMaster Data Services, numeric values can be automatically generated for the Code attribute, or for any other numeric attribute. 自动生成代码时,不会阻止您输入其他代码值;实际上只是自动设置初始值。When codes are generated automatically, you are not prevented from entering other values for codes; rather an initial value is automatically set.

生成 Code 值Generating Code Values

管理员可以通过编辑关联实体的属性,为 Code 特性配置自动生成的值。Administrators can configure automatically-generated values for the Code attribute by editing the associated entity's properties. 他们可以指定一个初始值,让每个后续值依次增加 1。They can specify an initial value, and each subsequent value is increased by one.

在相关工具之一中或使用临时过程向 MDS 中输入 Code 值时,可以保留 Code 值为空,Code 值将自动生成。When you enter Code values into MDS, either in one of the tools or by using the staging process, you can leave the Code value blank and a Code value will be automatically generated. 也可以指定您选择的 Code 值。Or you can specify a Code value of your choice.

生成其他属性值Generating Other Attribute Values

管理员可以通过创建业务规则,自动为 Code 之外的属性生成值。Administrators can automatically generate values for attributes other than Code by creating business rules. 他们可以指定一个初始值,然后指定每个后续值按其递增的值。They can specify an initial value, and specify the number each subsequent value is incremented by.

在相关工具之一中或使用临时过程向 MDS 中输入属性值时,可以保留属性值为空。When you enter attribute values into MDS, either in one of the tools or by using the staging process, you can leave the attribute value blank. 应用业务规则时,将以最大的现有值为基础增加值。When business rules are applied, the values will be incremented based on the highest existing value. 例如,如果规则是“属性默认为一个从 1 开始、增量为 4 的生成值”,并且属性当前的最大值是 700,则添加的下一个成员的值将是 704。For example, if your rule is "Default attribute to a generated value that starts at 1 and increments by 4" and the highest current value for the attribute is 700, the value for the next member that's added will be 704.

任务说明Task Description 主题Topic
自动为 Code 属性生成值。Automatically generate values for the Code attribute. 自动生成 Code 属性值 (Master Data Services)Automatically Generate Code Attribute Values (Master Data Services)
自动为其他属性生成值。Automatically generate values for other attributes. 自动生成 Code 之外的属性值 (Master Data Services)Automatically Generate Attribute Values Other Than Code (Master Data Services)