cancel
Showing results for 
Search instead for 
Did you mean: 

Length: Message mapping

Former Member
0 Kudos

May i know when can we use Length function in message mapping.

any examples.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

for example you could use it together with the substring function.

If you want for example use substring to select the first three characters of a string like input ABCDE -> output ABC

But if your input has only a length of 2 like AB your mapping results in an error.

You could check this with the length function:

if input length > 2 then substring else ...

Hope it helps.

Regards

Patrick

Former Member
0 Kudos

I couldnt get you...

Former Member
0 Kudos

Hi,

no problem then I will try it again

If you want to separate a substring with a length of 3 (just an example) then your input string must have a (minimum) length of 3.

Otherwise your mapping results in an error.

To prevent this error you could first check with the help of the length-function if your input string has the needed minimum length. Otherwise you could avoid using the substring function and your mapping will not crash.

Better?

Regards

Patrick

Former Member
0 Kudos

let me consider my exmaple...

I have sender field with 500 as length...

receiver fields length as 8.

in this case...

i have used

senderlength filed->length->receiver field.

does this work....

Former Member
0 Kudos

Hi,

sorry this time I don't understand what you want to do

But the length function returns a number -> representing the count of characters of the input field.

If you input is

ABCDE

the output of the length function will be 5

Some more examples:

ABCDEFG --> length --> 7

ABCDEFGHIJ --> length --> 10

A --> length --> 1

Regards

Patrick

Answers (0)