Assign text

The Assign text masking activity allows you to assign a string value to a specified column of all table records.

Table of contents
Usage
Example
Properties

Usage

To use the Assign text 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 and enter the string value you want to assign to that property.

While you can directly set a desired value, you can also use custom code to generate a value with a custom algorithm and data. Note that the Assign text masking activity remembers the first value it assigns to a record and assigns the same values to others, i.e. the value (or the custom code that determines the value) is evaluated only once. If you want to dynamically change the assigned value based on available data during package execution, use the Evaluate text function masking activity instead.

Example

In this example we have the Description column in the Transaction table where we don't know if there is any sensitive data or not. This column is not very important for our testing process so we can remove any potentially sensitive data by replacing everything in this column by an arbitrary value which will in this case be "Masked description". First we place the Transaction masking activity and put the Assign text masking activity within it. Once placed, we select the Description property that we want to mask with our chosen text value. Here, we will put Masked description as the value we want to assign. We leave other properties as they are.

Assign text example Figure 1: Assigning text values

Properties

Property group Property name Description Example
Input properties DataItemProperty The property to mask. Write x => x.Description or choose property from the dropdown list
Value The value to use as a replacement value. "Masked_description"
Input: Filter Filter Expression used for filtering records - only filtered items will be masked. x => x.Description.Length > 0
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. DescriptionRepeater
RepeatingKey Key to use for repeating detection. Write x => CompositeKey.Create(x.Description) or choose properties from the pop-up window
Misc DisplayName Display name of the activity in the workflow. Assign text
Result Contains the masking definition object. It's a part of the masking infrastructure and should be ignored. -