cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical Mapping Query

Former Member
0 Kudos

Hi,

Been using PI for a couple of years but I have rarely had a need to use the functions available at mapping time. I have an example where the following mapping (transformation) is required:

OutboundValue: "H"

Inbound Value: "-"

Outbound Value: "S"

Inbound Value: "+"

(H and S are the only 2 possible values)

i.e. if Outbound Value = "H" then Inbound Value = "-" Else Inbound Value = "+"

I have managed to achieve this using ReplaceString as follows:

This works as it does a ReplaceString of "H" with "-" followed by another of "S" with "+". Even though this works my feeling there must be a way involving Boolean functions i.e. If Then Else etc.

Is there another way to achieve the same result as I have managed without using a double pass of the ReplaceString function ?

Cheers,

PaulC.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi Paul,

For this particular scenario, I would recommend using the FixValues function from Conversions group, as follows:

In fact, FixValues work similarily to a set of if-else conditions, for converting values.

Regards,

Greg

Former Member
0 Kudos

Thanks Greg !

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Paul,

Even you can achieve this requirement using if then else function but i prefer fix value table like suggested by Greg.

Regards,

Raj