Generate decimal number in range

The Generate decimal number in range masking activity allows you to generate a random decimal number, with selected decimal digits, in the selected range.

Table of contents
Usage
Example
Properties

Usage

To use the Generate decimal 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 decimal number in a specific range requires you to enter the start and end numbers of the range and assign digits for the decimal part.

For largest numbers use Generate double number in range. For more information, on when to use a Decimal or Double number generator, see Microsoft page: Floating-point numeric types.

Example

In this example we want to generate a random decimal number from the 'Amount' column in the Transactions table. The Generate decimal number in range is perfect for this situation. First we place the Transactions activity into opened Package.xaml and put the Generate decimal number in range masking activity within it. Once placed, we select the Amount property that we want to mask with generated decimal numbers. We enter -15000 and -0.01 as the numbers used for range generation so that every generated decimal number is less than zero (a negative number). There is also a possibility to assigne the Number of decimal digits. We leave other properties as they are.

Generating decimal numbers in a specific range Figure 1: Generating decimal numbers in a specific range

Properties

Property group Property name Description Example
Input properties DataItemProperty The property to mask. Write x => x.Amount or choose property from the dropdown list
EnforceUnique If true, random selection should select unique values. true or false
Max Maximal number to generate. -0.01
Min Minimal number to generate. -15000
Input: Filter Filter Expression used for filtering records - only filtered items will be masked. x => x.Amount.IsBetween(-15000, -0.01)
SkipDefaultValues If true, default values will be omitted in masking (i.e. null values are not masked). true or false
Input: Repeating RepeaterId The ID of the repeater that will be used to detect repeating and save results when masking item key repeats. GenerateDecimalNumberInRangeRepeater
RepeatingKey Key to use for repeating detection. Write x => CompositeKey.Create(x.Amount) or choose properties from the pop-up window
Misc DisplayName Display name of the activity in the workflow. Generate decimal number in range
Result Contains the masking definition object. It's a part of the masking infrastructure and should be ignored. -