Pick value from list

The Pick value from list masking activity allows you to mask table columns by replacing them with a value from any list.

This masking activity is the base activity from which each of the Pick Data From List masking activities stem (as well as country specific Pick Data From List activities), but here you can choose values from a custom list, i.e. you are not limited to BizDataX picklists.

Table of contents
Usage
Example
Properties

Usage

To use the Pick value from list 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 TLookup and TProperty types, i.e. the type of list items you want to choose from and the type of the property you want to mask. 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 and the list item property you want to replace it with. Next, enter the list you want the Pick Data From List to be chosen from.

Example

Let's assume we want to mask the AccountType column in the Account table with values from a custom list. We create the custom list by creating a AccountType class with a TypeName property as part of our custom code, and then create a list of three AccountType objects representing Personal, Savings and Checking account types. Our custom code now looks like this:

public static class Code
{
    public class AccountType
    {
        public string TypeName { get; set; }
    }

    public static class Code
    {
        public static List<AccountType> TypeList = new List<AccountType>()
        {
            new AccountType() { TypeName = "Personal" },
            new AccountType() { TypeName = "Savings" },
            new AccountType() { TypeName = "Checking" }
        };
    }
}

After we created our custom list and building the project, we can place the Account masking activity on our workflow, and then place the Pick value from list masking activity inside it. In the Select Types windows we choose Browse for Types... to find our custom AccountType class in the Browse and Select a .Net Type window to pick as the TLookup, and choose string as TProperty.

Select Types dialog Figure 1: Select Types dialog

Once placed, we choose the property we want to mask, which is Type in this case, and the property from which we want to choose Pick Data From List from, which is TypeName in this case. Lastly, we add Code.TypeList in the field to specify the list which contains our custom Pick Data From List.

Pick value example Figure 2: Value masking

Properties

Property group Property name Description Example
Input properties DataItemProperty The property to mask. Write x => x.Type or choose property from the dropdown list
EnforceUnique If true, random selection should select unique values. true or false
Input: Filter Filter Expression used for filtering records - only filtered items will be masked. x => x.Type.StartsWith("A")
SkipDefaultValues If true, default values will be omitted in masking (i.e. null values are not masked). true or false
Input: Lookup LookupItems Items to use for random selection of parameters during masking. Code.TypeList
LookupProperty Lookup item property whose value should be used as replacement value. lookup => lookup.TypeName
Input: Repeating RepeaterId The ID of the repeater that will be used to detect repeating and save results when masking item key repeats. AccountTypeRepeater
RepeatingKey Key to use for repeating detection. Write x => CompositeKey.Create(x.Type) or choose properties from the pop-up window
RepeatValueOnly Whether repeaters should only save the used lookup value, and not entire lookup item. true or false
Misc DisplayName Display name of the activity in the workflow. Pick value from list
Result Contains the masking definition object. It's a part of the masking infrastructure and should be ignored. -