I love this project! I have a lot of fun doing it, and I use it a lot with my clients. So for me is what I call a win-win situation. So today I updated the BizTalk Mapper Extensions UtilityPack project with one new Functoid that you can use in your BizTalk Server maps Functoid: the String Splitter Functoid.
Last week I had the need 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 had to use it across different maps, I quickly changed my approach and created a new Functoid that you can now use in your BizTalk Server maps.
📝 One-Minute Brief
Introduces the String Splitter functoid from the BizTalk Mapper Extensions Utility Pack, allowing developers to split string values directly inside maps and simplify complex transformation logic.
String Splitter Functoid
This functoid allows you to convert a string to a number (integer)
Parameters
This functoid splits 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 the sample shown in the picture above, we receive the string AA. 123. SANDRO. 312.1, and we want to retrieve the fourth subset of the concatenated string delimited by the “.” 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 in a map, extending BizTalk Mapper capabilities.
Download
You can download BizTalk Pipeline Components Extensions Utility Pack from GitHub:
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.
