Generate value

The Generate value masking activity allows you to generate a value of any type using an IGenerator implementation before saving it to the database.

Table of contents


To use the Generate value masking activity, it must be placed inside a table masking activity or a similar activity that iterates over data. Once placed, a Select Types window will open where you must choose the TValue type, i.e. the type you want to generate. Selecting the Browse for Types... option will open the Browse and Select a .Net Type window where you can search for more types. After clicking OK, you can choose the property you want to mask. Next, enter a new instance of a generator to generate values.

Select Types window Figure 1: Select Types window


In this example we want to generate street numbers in a sequence for the Address table. First we place the Address masking activity into opened Package.xaml and put the Generate value masking activity within it. In the Select Types windows we choose Int32 as the TValue. Once placed, we select the Number property that we want to mask with our text generator. For the generator, we enter a new instance of a string generator that also makes use of a number sequence generator so that our generated e-mails are unique.

Generating values Figure 2: Generating values


Property group Property name Description Example
Input properties DataItemProperty The property to mask. Write x => x.Number or choose property from the dropdown list
Generator Generator used to generate values. new NumberSequenceGenerator(1, 1)
Input: Filter Filter Expression used for filtering records - only filtered items will be masked. x => x.Number.IsBetween(1, 100)
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. GenerateValueRepeater
RepeatingKey Key to use for repeating detection. Write x => CompositeKey.Create(x.Number) or choose properties from the pop-up window
Misc DisplayName Display name of the activity in the workflow. Generate value
Result Contains the masking definition object. It's a part of the masking infrastructure and should be ignored. -