cancel
Showing results for 
Search instead for 
Did you mean: 

String match, value to be sent

Former Member
0 Kudos

I am doing a mapping. I have a field in source "Details". It is sent as a string The string may contain constants like Price, Brand, Year.

If the string contains "Price", I have to send the vale "X" to the target field Price

If the string contains "Brand", I have to send the vale "X" to the target field Brand

If the string contains "Year", I have to send the vale "X" to the target field Year

The source string Details can contain all the three constants, two constanst, one constant or none

Source

Details

Target

Price

Brand

Year

Is UDF needed for this?

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Midhun,

You can use below mapping.

Regards,

Praveen.

former_member182412
Active Contributor
0 Kudos

Hi Midhun,

If the Price or Brand or Year exist in the zero position we need to cater for that one also, so you can use below mapping.

You can apply the same logic for other fields also.

Regards,

Praveen.

Former Member
0 Kudos

Thanks Praveen

It's working in all scenarios. You made my day

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Hello Midhun.

Not required.

You can use If then without Else and acheive it.

Like

String------------

                            Equals-----------------------------------If

price-----------                                                                   ---------------------------------Price
                                                       Price(constant)- ---Then

The same for other 2 fields.

Let us know if you face any issue.

Former Member
0 Kudos

This will not work.

I tried it first. If the string contains, Price,Brand,Year then it will not work

It works only if the Price comes alone. Even if I give input as "price" or "Price," it will not work

Thanks