I love this project! I have much fun doing it, and I use it a lot in my clients. So for me is what I call a win-win situation. So today I update BizTalk Mapper Extensions UtilityPack project with one new Functoid that you can use on your BizTalk Server maps Functoid: String Splitter Functoid.
Last week I had the needed to use a particular mapping functionality several times in different maps:
- Extract one specific subset of a concatenated string;
- For example “AA.123.SANDRO.312” and I need to extract the third position: “SANDRO”
My first strategy was to create a Scripting Functoid, but because I have to use it in different maps, I quickly change my approach and created this new Functoid that now you can use inside your BizTalk Server maps.
String Splitter Functoid
This functoid allows you to convert a string to a number (integer)
Parameters
This functoid split a string by a specific splitter character, and it accepts 3 inputs:
- The first parameter is the input value to be split;
- AA.123.SANDRO.312
- AA-123-SANDRO-3122.
- The second parameter is the position to be returned (the subset of the string to be retrieved);
- 0
- 3
- The third parameter is the splitter character;
- ,
- .
The output of the functoid will be a string present in the split array, for example: SANDRO
In this In sample described in the above picture, we are receiving a string: “AA.123.SANDRO.312.1” and we want to retrieve the fourth subset of the concatenated string delimited by “.” character. So, in this case, the functoid will return: “1”.
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: