on 09-16-2008 11:09 PM
Hi.
I would appreciate any input on a mapping scenario I am having difficulty with.
I have a "Node" which is 0..Unbounded. This node has two attributes which are optional:
Node
@type
@status
My scenario requires that I map differrent instances of this node based on one or the other attribute i.e.
if Node@type = "Actual" -> Map Node Value to Target A
if Node@status = "Complete" -> Map Node Value to Target B.
I am using the ifWithoutElse function to try to achieve my goal.
Problem is, via an example:
If I have three Nodes.
1. Node (Value)
@type = "Actual"
@status = "ADDA"
2. Node(Value)
@type = "Actual"
3. Node(Value)
@status = "Completel"
.
The mapping to Target A in the first two cases is fine, however mapping to Target B based on the Node with @status="Complete" does not fare so well. What is happenning here is the value in Node 2 gets mapped. It provides the value from the first node it reaches that does not have a @status attribute.
I would appreciate any insight into this please.
Thank you.
Mick.
Hey
You need to play around with context change a little bit.
Try using RemoveContect or CollapseContext before IfwithoutElse
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looked into the SUPPRESS issue as alluded to by VJ:
The result of the ifWithoutElse looks like the following:
stringEquals:in0___________stringEquals:in1_________stringEquals:out
SUPPRESS_____________SUPPRESS____________ SUPPRESS
false___________________ XXXX___________________SUPPRESS (Node without attribute)
true____________________BBBB__________________ BBBB
true___________________AAAA__________________ AAAA
_______________________ AAAA__________________AAAA
The value I want in in the final line but this seems to get confused and as a result of the item without the attribute I am searching upon the column, stringEquals:in0 seems to get moved up one place. I would ideally with it to look like the following:
stringEquals:in0___________stringEquals:in1_________stringEquals:out
SUPPRESS_____________SUPPRESS____________ SUPPRESS
_______________________ XXXX___________________SUPPRESS (Node without attribute)
false___________________BBBB__________________ BBBB
true___________________AAAA__________________ AAAA
true__________________ AAAA__________________AAAA
I would appreciate any input you may have. IF this can be achieved without the use of UDF then all the better as I am not very competent in UDF functionality.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mick,
I created a similar mapping taking your requirement.
Here are the screen shots describing the same.
http://farm4.static.flickr.com/3154/2867939407_b2ffcd6541_o.jpg
http://farm4.static.flickr.com/3147/2868733824_f611959cd5_o.jpg
to the existing mapping, either add a split by value after Node Value.
regards,
venkat.
Spoke too soon.....The problem still occurs unfortunately.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This has been solved by a colleague of mine:
The key was to use "exists" as well as remove contexts in the detemination.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mick,
You can use CollapseContext function in front of Status attribute and then use your logic as u mentioned u r using IfwithoutElse function.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mick,
This problem is because, you do not have the values for the attributes for each of the node. The problem is when you look at the Q for an attribute, when there is no attribute for this node, automatically the next available attribute is taken in that place. check if your q is showing a suppress there. If so you need to compare a suppress also. Or you might need to add suppress to the queues using a UDF.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.