cancel
Showing results for 
Search instead for 
Did you mean: 

Display multiple Error codes Descriptions at a time in One Target Node

0 Kudos

Hi ,

I am trying to display multiple error codes description at a time in target Node like

input : <error> 404,405</error>

output : <error>resource not found, error </error>

I tried with value mapping and Fix value mapping.But it is not happening because we have some 20 error codes.

Is there any UDF or mapping ideas please help me.

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Hi ,

Source Field-->UDF-->FixValues/Valuemapping-->TargetField

Single value:

Execution type : AllValues of context
input inp

String[] str=inp[0].split(",");
for(int i=0;i<str.length;i++)
result.addValue(str[i]);

Thanks,

Manoj

0 Kudos

hi manoj,

i tried with your code but it is showing error

error is

  • error: incompatible types: unexpected return value
    
    return result;
    ^

manoj_khavatkopp
Active Contributor
0 Kudos

don't add the last statement return result . Copy paste my exact code.

0 Kudos

got it manoj changed n got it n working fine.

But it is showing only one error code description in output. i add another function for that to view all input values

now it is showing correctly.

manoj_khavatkopp
Active Contributor
0 Kudos

Good to know 🙂 Please mark the correct answer and close the thread.

Answers (2)

Answers (2)

former_member187010
Participant
0 Kudos

Use udf and read all error code separated by comma (,) and return result as per the expectation. In case you find difficulty with udf try to explore more, you'll get it.

former_member187010
Participant
0 Kudos

Use udf and read all error code separated by comma (,) and return result as per the expectation. In case you find difficulty with udf try to explore more, you'll get it.