on 12-03-2010 8:16 AM
Hello everybody,
Here my scenario: I want to map from IDOC to CIDX document. Now one node should be created, when one field of the original message has a special value. The input field can have different values.
Now when I want to work with the CREATELF method, an error occurs: Target element could not be created, target needs a value for this element. When I map a Constant to the Node, it works, but the node is created everytime and I want that the target node is only created, when the input field has a special value.
I hope you can help me.
Thank you and best regards
Martin
Hi,
take source field compare it with a constant having your special value using equalS function........take the output of this to creatif and then map it to target field.......u may need to use removecontext and splitByValue between equalS and creatif if u are using this node in a heirarchical output.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
@Rajeev: Now I am close to the solution, I don't get an error any more. But the node isn't created. Here is my target structure with occurences:
> Node A (1...1)
> Node B (0...1)
>Node C (1...1)
Field 1 (1...1)
Field 2 (1...unbounded)
I want to create Node B when the condition is true. When I test the Message Mapping in ESR, Node A is created, but has no subnodes. In Node A, I just mapped a constant. What could be my mistake?
BR Martin
Edited by: Stampflmar on Dec 3, 2010 10:38 AM
Hi Raajev,
now I get the same error again, that field cannot be created because target xsd needs a value. But does that mean, that the node is created, but i have now a problem with my mapping of field one?
Because when I do some changements in the node B-mapping, everytime the node is created with subnode and field 1 with the right value, but the condition handling is missing. So I don't know right now what could be the reason for my problem.
BR Martin
Hi,
Whats the occurrence of that target node??Change its to 0..1 or 0..unbounded (depending upon ur requirement) and chk.
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you map a constant it works,,but when there is a condition it does not work.
It looks like its a mandatory field and since your condition is not gettting satisfied its unable to create the node. put a true condition and check it.
Also as Mark suggested, if you want the value to be populated then do not use CREATEIF.
Thanks
S
Edited by: Saiyog Gonsalves on Dec 3, 2010 9:53 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The createIF node function will only work if you feed it Boolean values. If you really need to pass only a specific value, you can try using if or ifWithoutElse
.
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.