Posts

Showing posts from July, 2019

Boomi Mapping - Removing special chars from an input

Image
Dell Boomi mapping shape provides numerous ways to modify/enrich an input via functions. In this post I am going to show how I validated and removed special chars from an input using Scripting and do it along with another string function.

The user defined functions available with mapping, allows us to apply sequence of functions to the input. In this example, I am going to use it.

Use Case:

I have two input strings coming from the source profile (first_name and last_name), which I want to first concatanate together and then remove non-alphanumeric characters if present.


Solution


In your map, add an User Defined function and add two inputs; first_name, last_name. As the first step, add a function "String Concat" under the  "String" category.  Specify first_name and last_name as the inputs. Also set a delimiter, if you need a one. In my case, I want to concatenate the values with '.'.Map first_name and last_name input variables to the added function. As the se…

Boomi Mapping - User Defined function based on list of elements in a collection

Image
Recently I came across a requirement to validate all the elements in a collection and return an output based on that. Let me explain it with an example. I have a XML document containing information about users including a collection to indicate the roles of the person.


Source Document

<users><user><first_name></first_name><roles><role>admin</role><role>subscriber</role><role>creator</role></roles></user></users>
Destination Document

I want to map this into a destination profile which has elements to indicate whther the user is an admin or a subsriber.


<users><user><isAdmin>true</isAdmin><isSubscriber>true</isSubscriber><user><users></users>
In order to achieve this I have to write a map funtion. But for a map funtion, we can't input a collection. If we map the "roles" collection into the map fuction, it creates multiple output documents,…