on 07-02-2009 8:29 AM
Hello,
I have target structure like below
Header - 0..Unbounded
SubHeader - 0...1
elements - 0..1
...
...
I need to create Header tag upon some condition mets
I used a createIF node function for the same and it works only for the success condition and its throwing an error as
Cannot produce target node...but my occurence is 0..unbounded for header and 0.1 for subHeader
I am passing the value of UDf and used equals Function..as a condition to create IF and used If without else also but still same..
Any help is appreciated..
Rajesh
Edited by: Rajesh on Jul 2, 2009 1:00 PM
I used a createIF node function for the same and it works only for the success condition and its throwing an error as
Cannot produce target node...but my occurence is 0..unbounded for header and 0.1 for subHeader
Since the occurence is 0..unbounded you need not worry about mapping the node with any constant.....just check what is the o/p of your UDF when you get the error...is it producing the required value and is getting the required i/p value?...may be in the error case the input to the equalS function from the UDF is not proper
isuppose the equals function is the equalS (Text) function...
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kiran,
I mapped the condition to Header field as
FirstCase
constant (aaa) equals -- ifiwthout else ---> then constant -->Header
constant(aaa)
if both constatns values are equal then no error ,otherwise throws an error saying target field cannot produce..
second case
cosntant --> Header
constant (aaa) equals -- ifwithout else ---> then constant -->SubHeader
constant(aaa)
Same error in case of values not equal ...
Also I have element occurence as 1..1
constant (aaa) equals -- ifiwthout else ---> then constant -->Header
constant(aaa)
instead of mapping a constant to the Header field did you try mapping a node from the source structure which you know will be present when the UDF returns true......also check by mapping blank constant to the Header (if you are not already doing it)..
Edited by: abhishek salvi on Jul 2, 2009 3:33 PM
This is how i mapped..
Am i able to overcome the error when i map some source node value ..
but the strange thing is not able to get the element for some condition which is showing the value in queue..
Anyhow i think we need to map some source message value for generating the target on conditions..
Thanks to all of you.....
Rajesh
use Exists as below
if Field1 exixts then Field1
else
constant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please try mapping the root node with a constant. As even if your header node is not created but the root node has to be created. Hope this will solve your probelm.
Regards,
Shweta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
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.