The Generate number in range masking activity allows you to generate a random number in a specific range.
|Table of contents
To use the Generate number in range masking activity, it must be placed inside a table masking activity or a similar activity that iterates over data. Once placed, select the property you want to mask. Generating a number in a specific range requires you to enter the start and end numbers of the range.
Additionally, you can set the EnforceUnique property to make sure every generated number is unique. This option must be used with care so that the number of table records is not greater than the possible numbers in the desired range.
In this example we want to generate CSC (Credit Card Security) number in the CreditCard table. This number has to be three digits long, so the Generate number in range is perfect for this situation. First we place the CreditCard masking activity into opened Package.xaml and put the Generate number in range masking activity within it. Once placed, we select the Csc property that we want to mask with generated numbers. We enter
999 as the numbers used for range generation so that every generated number is three digits long, and we leave other properties as they are.
Figure 1: Generating numbers in a specific range
|The property to mask.
x => x.Csc or choose property from the dropdown list
|If true, random selection should select unique values.
|Maximal number to generate.
|Minimal number to generate.
|Expression used for filtering records - only filtered items will be masked.
x => x.Csc.IsBetween(100, 999)
|If true, default values will be omitted in masking (i.e. null values are not masked).
|The ID of the repeater that will be used to detect repeating and save results when masking item key repeats.
|Key to use for repeating detection.
x => CompositeKey.Create(x.Csc) or choose properties from the pop-up window
|Display name of the activity in the workflow.
Generate number in range
|Contains the masking definition object. It's a part of the masking infrastructure and should be ignored.
BizDataX Documentation © Built by Ekobit. All rights reserved.