Topic
• 4 replies
• Latest Post - ‏2012-11-27T14:14:16Z by SudhanshuSawlani
Muk1234
22 Posts

# Pinned topic Use a functional map as an input to another map

‏2012-11-21T07:40:28Z |
Hi,Can anyone help me on this please. I have a functional map which generates an output field "enid" whose value may be 1,2,3 and so on depending on those many inputs. For e.g if there are 3 custids like cust1,cust2,cust3 THEN the map generates three enids as 1,2 and 3. custid field is a String whereas enid is a number. So basically cust1 maps to enid=1,cust2 maps to enid=2 and so on. In the next functional map say fmap2, i want to use this mapping because the input for this map would be any of the custid say cust2 and this should output enid=2 which was generated by the above map. Would appreciate any help on this.
Updated on 2012-11-27T14:14:16Z at 2012-11-27T14:14:16Z by SudhanshuSawlani
• thorstenhirsch
94 Posts

#### Re: Use a functional map as an input to another map

‏2012-11-24T12:20:57Z
I don't understand.

> So basically cust1 maps to enid=1
http://...
> In the next functional map http://... the input for this map would be any of the custid say cust2 and this should output enid=2

So both functional maps should map a custid to an enid? Why don't you use the same functional map then?
• thorstenhirsch
94 Posts

#### Re: Use a functional map as an input to another map

‏2012-11-24T12:22:06Z
I don't understand.

> So basically cust1 maps to enid=1
http://...
> In the next functional map http://... the input for this map would be any of the custid say cust2 and this should output enid=2

So both functional maps should map a custid to an enid? Why don't you use the same functional map then?
Please ignore the http links in my previous posting. Those should have been just some dots like "...".
• Muk1234
22 Posts

#### Re: Use a functional map as an input to another map

‏2012-11-26T08:28:55Z
Please ignore the http links in my previous posting. Those should have been just some dots like "...".
Thanks @thorstenhirsch for replying. My question was "can we use a functional map as an input to the other functional map". May be I wasnt clear enough. So to elaborate,Can we use the output of one functional map as an input to another functional map? And I got the ans. Its Yes. All we need to do is copy the output field and paste it in our rule where we have to use it. Anyways Thanks a lot for replying.
• SudhanshuSawlani
8 Posts

#### Re: Use a functional map as an input to another map

‏2012-11-27T14:14:16Z
• Muk1234
• ‏2012-11-26T08:28:55Z
Thanks @thorstenhirsch for replying. My question was "can we use a functional map as an input to the other functional map". May be I wasnt clear enough. So to elaborate,Can we use the output of one functional map as an input to another functional map? And I got the ans. Its Yes. All we need to do is copy the output field and paste it in our rule where we have to use it. Anyways Thanks a lot for replying.
Muk, this can be one way.

However, you can also use a functional map within a functional map. The inner functional map executes first and its output can be an argument to the outer functional map.

Ex: F_Map1(A,B,F_Map2(a,b))