Custom DS on Field

Custom DS on Field

The above 3 types just mentioned the in built DS types provided in Mapper. What if we want to check the values “on the Fly” during Run time & perform some action based on that?

Custom DS is the answer. Select “Custom Dynamic Skip” from the drop-down for amount field.

Mapper_Custom DS

Custom DS screen will pop-up. This is a small IDE, where users can write their VB.Net code to perform various Run-Time actions based on the data they put in their excel data sheet.

Besides the in built DS types that we discussed before Custom DS also supports various options.

Custom DS Editor

Here we will see a small example that if we encounter “$” in amount field it should stop the transaction.

iTable_CustomDS

iValue contains the field value for which we have defined Custom DS.

It’s “amount” here.

Following is the VB.Net code:

If iValue.ToString() = “$” then

Return 4

End If

Returning 4 will stop the transaction there itself.

To test your code, enter $ in iValue & click on Test button.

It will display Result: 4 (the return value).

Look at the description below it.

** If there is any Syntax error in your code it will also notify about that.

Example for Custom DS

Click on OK button and execute the file.

CustomDS_Stopped

 

 

Next:

Dynamic Skip on Screen