on 08-05-2008 5:16 PM
Hi all,
I have a text message in Source which i need to split into multiple values with length 1000 chars.
Source :
Comments (0..1)
Target:
Node
|-- Item1
|--TEXTNAME PO_HEADER_TEXT
|--ITEMREF
|--SEQUENCE 1
|--TEXTSTRING Text string (max length 1000 chars)
I need to increment sequence by one each time. Can any body please suggest how to do this?
Kind regards,
Kulwant
hi, use the standar function copyValue.
<sourceField>-copyValue-<targetField>
by this way you will use the <sourceField> with occurrence 0...1 many times you need
Thanks
Rodrigo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you need multiple item nodes for each 1000 chars and increment the sequence by 1?
You can split the string in user defined function
int j = 0;
while(j < s.length())
{
if(s.length() > (j+1000))
{
result.addvalue(s.substring(j,j + 1000));
j = j+1000;
}
else
{result.addvalue(s.substring(j)); j = j+1000;}
}
Thanks,
Beena.
Item1
|--TEXTNAME PO_HEADER_TEXT
|--ITEMREF
|--SEQUENCE 1
|--TEXTSTRING Text string (max length 1000 chars)
UDF1 - code to split the string
Try this:
content - UDF1 - item1
constant --ITEMREF
constant - TEXTNAME PO_HEADER_TEXT
content - udf1 - index -- splitbyvalue --sequence
content - udf1 - splitbyvalue --Textstring
Thanks,
Beena.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.