It’s been a while since I don’t make any changes to one of my favorite pet projects: BizTalk Mapper Extensions UtilityPack! Today I’m happy to announce the release of a new BizTalk Functoid: Convert to a Number Functoid.
Note: And it will not be the only one, soon I will release two new Functoids that I’m working on.
Today I was working on a map that I had the need to transform several numbers delivers in a string with a decimal format:
to an Oracle NUMBER(x) – without decimals.
Initial, I thought in create a Scripting Functoid and reuse it inside the map for each element. However, I realize that I will have to use the same transformation in different maps… so I end up creating this simple Functoid.
Convert to a Number Functoid
This functoid allows you to convert a string to a number (integer)
The functoid takes three mandatory input parameters:
- The input value to be converted to a number;
- A character that describes what is the decimal separator (can be empty);
- A character that describes what is the group separator (can be empty);
The output of the functoid will be a Number (integer), example: 1234
In this sample described in the picture above we are receiving a string with a decimal: “1.000” and we want to transform into “1”. So, in this case, the functoid configuration will be:
- the first input will be our value;
- the second input will be “.” (dot) that describe the decimal separator;
- and the third input will be “” (empty) because there isn’t any group separator (delimitator);
BizTalk Mapper Extensions UtilityPack: Project Description
BizTalk Mapper Extensions UtilityPack is a set of libraries with several useful functoids to include and use it in a map, which will provide an extension of BizTalk Mapper capabilities.
Where to download?
You can download this functoid along with all the existing one on the BizTalk Mapper Extensions UtilityPack here:
BizTalk Server Community Extensions Utility Packs GitHub Repository