cancel
Showing results for 
Search instead for 
Did you mean: 

Two source values with single target values in Value Mapping

Former Member
0 Kudos

Hi All,

I am facing the issue in value mapping. I have two Source values which I want to map with a single Target value i.e N:1.

my scenario is either of the values, 'Shoes' or 'Footwear', under agency | schema 'BS_SENDER_01 | Nike_UK' will be mapped to the value 'Sneakers' under the agency-schema 'BS_RECEIVER_01 | Nike_US'.

I have created one Value Mapping group for Shoes to Sneakers successfully , now while creating another value Mapping Group for Footwear to Sneaker I am not able to create that. Its giving Error   :-


" Check Result for Object ValueMapping_Test

 

Value BS_RECEIVER_01 | Nike_US | Sneakers already exists in value-mapping group with ID 789d59d7-300...

"

So my question is can I do this using Value Mapping?? if yes then how????? or I have to go for different approach for like "If-Else"


Accepted Solutions (1)

Accepted Solutions (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi Gaurav,

N:1 is possible in Value mapping.

When you save the first set of values, save and right-click ... there will be an option "Value mapping in all agencies"

Click on it and maintain the next set of values like below.

Hope it helps!

Ambrish

Former Member
0 Kudos

Hi Ambrish,

Thanks for the reply.

I saved my first set of values but where to right click??..as i am not getting any option like you mention.

ambrish_mishra
Active Contributor
0 Kudos

RIght click on the row which you saved.

ambrish_mishra
Active Contributor
0 Kudos

Here you go.... .

iaki_vila
Active Contributor
0 Kudos

Hi Ambrish,

Great!, i didnt know this possibility, thank you very much.

Regards.

Former Member
0 Kudos

Thanks a lot......It Worked!!!!!!

Former Member
0 Kudos

Hi Ambrish,

Can you just tell me what is the advantage here using Value Mapping over If-Else function.??

iaki_vila
Active Contributor
0 Kudos

Hi Gurav,

From my point of view, if the cantity of values increase, the If-then logic could be very confused. On other hand, with vm you have the configuration values in the configuration side of PI, in the integration directory, with the other option you have them only in the design side.

Regards.

Former Member
0 Kudos

Ambrish ,I think you went to ID -> Tools -> Value mapping and there you maintained all this configurations.

What I did is I went to Value Mapping Group

Created two entries for source and one entry for target and saved.   It also worked 

ambrish_mishra
Active Contributor
0 Kudos

The value mapping is a reusable entity and transportable. If then else is cumbersome and if a change comes, you will have to change the mapping. Here you just add an entry and transport it.

Ambrish

PS: Please mark the question as answered.

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Gaurav,

As far as I know the value-mapping function doesn't let you to have two different source values with the same target value. I usually use this little trick:

a ---- 123

b ---- 123

c ---- 123

I would configure this:

a ---- 123_1

b ---- 123_2

c ---- 123_3

Later i would use the function substring to take the first 3 characters.

I hope this helps

Regards.

Former Member
0 Kudos

Thanks for the reply
I have one doubt lets say that we cant achieve this from Value Mapping..... Now considering your little trick instead of using Value mapping and then Substring function .. Why dint use IF-Else ???.. any Positive side for your approach?