Hidden Feature of Index Functoid

Posted: September 13, 2013  |  Categories: Maps Uncategorized
You can download the entire article as a PDF document.
Hidden Feature of Index Functoid

Today I came across one of the hidden features of Index Functoid that I feel worth to share.

We all know how to use Index Functoid to extract values at a particular index in a repeating record. We do this by configuring an index Functoid with two inputs (generally)

1. The repeating record’s element

2. Index value (starts with 1)

1

However, after reading the full functoid description, I was interested in the highlighted text which mean, index functoid can take >2 parameters depending on the depth of the hierarchy of the source schema. To explore more, consider a sample input like below.

2

Input has 3 departments HR, Admin & Sales. Consider the below simple map.

3

Test 1:
Functoid inputs: “Name” & “1”
4

Output 1:

5

So, it extracted the First Departments, first Employee.

Test 2:

Let us say, you want to extract the value “HREmployee1”.
Changing your index functoid input to “Name” & “2” will not give you a result. This is the trick. You should extract the first element of second employee record of first department.
Input: “Name”, “1”, “2”

6

Output 2: You get “HREmployee1”

7

Test 3:

Let us say, you want to extract the value “AdminEmployee2”.
Input should be: “Name”,1,3,2 (2 is for 2nd department)

8

Output 3:

9

One way to easily understand this is to look at the XSLT generated.
Hope this gives you an idea of extracting hierarchical values from source.

You can download the entire article as a PDF document.
Hidden Feature of Index Functoid
One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

Back to Top