on 07-23-2012 11:26 AM
Hi all,
i have to create an Idoc from a flat file. My structure is described below:
DOC_NUMBER | ITEM NUMBER | CUSTOMER_NUMBER | VALUE |
---|---|---|---|
00000001 | 001 | 1234567890 | 5 |
00000001 | 002 | 5555555555 | |
00000001 | 003 | 6666666666 | |
00000002 | 001 | 7777777777 | |
00000002 | 002 | 1234567890 | 3 |
00000002 | 003 | 3333333333 |
I created 2 idocs at doc_number value changed, with 3 items each.
idoc1
|_header ( 00000001 )
|_Items ( 001 )
|_Items ( 002 )
|_Items ( 003 )
idoc2
|_header ( 00000002 )
|_Items ( 001 )
|_Items ( 002 )
|_Items ( 003 )
I have to create also a new segment when the customer value is equal to "1234567890". I tried to use the Node function: "CreateIf", but the result is :
idoc1
|_header ( 00000001 )
|_Items ( 001 )
|_Items ( 002 )
|_Items ( 003 )
|_Customer( 1234567890 )
|_Customer( 1234567890 )
idoc2
|_header ( 00000002 )
|_Items ( 001 )
|_Items ( 002 )
|_Items ( 003 )
Any suggestions ?
Hi,
Most probably you need a context change for the target node Customer. Use splitByValue(Each Value) function to add the required context change.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Greg,
thank u for your replay.
I'm using the below mapping:
CUSTOMER_NUMBER --
|___ "EqualS"-- > "CreateIf" --> "CollapseContexts"--> SEGMENT
|
constant (1234567890 ) --
What should I use to connect the two functions ( createIf and splitByValue(Each Value) ) ?
thank you in advance.
Regards,
Daniele.
Hi Greg,
I deleted the CollapseContexts function, but as result, no segment for customer_number was created. Below the queue content for the entries:
DOC_NUMBER | ITEM NUMBER | CUSTOMER_NUMBER | VALUE |
0000000001 | 001 | 6666666666 | |
0000000001 | 002 | 5555555555 | |
0000000001 | 003 | 1234567890 | 5 |
0000000002 | 001 | 7777777777 | |
0000000002 | 002 | 3333333333 | |
0000000002 | 003 | 1234567890 | 3 |
SUPPRESS |
SUPPRESS |
SUPPRESS |
SUPPRESS |
SUPPRESS |
[] |
[] |
SUPPRESS |
SUPPRESS |
SUPPRESS |
SUPPRESS |
[] |
[] |
Thank you very much for your support.
best regards,
Daniele
When the customer number is equal to 1234567890, I have to create a segment where I add the values of fields "customer_number" and "value".
idoc1
|_<header>
|_ doc_number( 00000001 )
|_<Items>
|_item_number( 001 )
|_<Items>
|_item_number( 002 )
|_<Items>
|_item_number( 003 )
|_<customer>
|_customer_number ( 1234567890 )
I_value ( 5 )
idoc2
|_<header>
|_ doc_number( 00000002 )
|_<Items>
|_item_number( 001 )
|_<Items>
|_item_number( 002 )
|_<Items>
|_item_number( 003 )
|_<customer>
|_customer_number ( 1234567890 )
I_value ( 3 )
Best regards,
Daniele.
Ok, now it sounds clear. Try with the following:
customer_number -> equalsS( constant(1234567890) ) -> createIf -> customer(segment)
customer_number -> customer_number (field)
value -> value
Make sure there are no modifications to the contexts of the source fields - the default contexts should work fine.
Regards,
Greg
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.