on 07-23-2008 7:10 AM
Hi,
When I use the visual mapping tool, I specify the condition that:
<SourceValue> equalsA 1, <TargetValue> value is 1; else it's 0.
However in the source XML, sometimes source XML is like:
<Root>
</Root>
where there's no SourceValue element. And now the mapping has exception. Then I try to use IsNil functionality, however then another exception saying "cannot cast '' to decimal" occurrred.
Is there a way for me to judge in the mapping so that I can pass through, e.g., when there's no this element, the target value is also 0.
Best regards,
-Stanley
Hi,
Just add one Node "mapWithDefault" --> Double click on it and pass value as "0"
So it will generate the node <TargetValue> == 0 whenever SourceValue will not be available
Thanks
swarup
Edited by: Swarup Sawant on Jul 23, 2008 8:19 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First check if the node exist using the node function exists and then check your condition.
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Use Condition Function , pass value if u get from the source or make other lement as constant 0 as u mentioned
rgds
srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.