The Set number repeating value activity allows you to set a specific integer value for repeating during package execution.
|Table of contents|
To use the Set number repeating value activity, it must be placed inside a table masking activity or a similar activity that iterates over data. Set the RepeaterId as the ID of the repeater you want to add values to. Next, change the property RepeaterKey by selecting the ... button to choose from which table record properties will the key be composed of, up to a maximum of five properties. This will dictate by what key the new repeating value will be saved in the repeaters database. Lastly, add the function which will get the value by setting the GetValueFunc property. This can be done by either using a lambda expression to get the value from the record (e.g.
record => record.Value) or using custom code to calculate the value. Either way, the function must return an integer value.
Figure 1: Property Selector window
Let's assume that we are masking the CreditCard table where we mask everything except the Csc column. However, we will mask CSC numbers in another table that also contains the credit card number, so we want to set repeater values with credit card numbers as keys and CSC numbers as values during masking of the CreditCard table. Furthermore, we want to increase the value of the CSC number by a hundred to mark the values as masked.
First we place the CreditCard masking activity and put the Set number repeating value masking activity within it. Then we can set the RepeaterId property to the ID of the repeater we are using, which is
"CscRepeater" in our case. Next, we create the RepeatingKey by selecting the ... button to open the Property Selector window where we can select the Number property and click OK. Lastly, we add the lambda expression
record => record.Csc + 100 as the GetValueFunc to create the desired repeater value for every record.
Figure 2: Setting a text repeating value during masking
|Property group||Property name||Description||Example|
|Input: Repeating||RepeaterId||The ID of the repeater.||
|RepeatingKey||Repeating key to assign.||
|Misc||DisplayName||Display name of the activity in the workflow.||
|GetValueFunc||Lambda expression used to get the repeating value.||
|Result||Contains the masking definition object. It's a part of the masking infrastructure and should be ignored.||-|