on 06-09-2008 11:29 AM
My scenario is IDOC 2 IDOC,
How do I define the mapping, whereby if a particular field in the source is null then a constant u2018testu2019 should be passed to the target?
Thanks for the replies!
hi
try with create if function
regards
chandrakanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
This can be implemented by two ways
1)use Exists (it is a node function), it returns false if input to it is null.
so output of exists will be false if input is null .
use if withoutelse . and not(boolean function) after the output of exists so that if the value is null it will allow "test" to be passed as constant and if the input is not null it will pass nothing and as the second input pass 'test' as a constant .
2)Use CollapsContext : It returns blank([]) if input is null , you can compare the output of collapscontaxt with blank and give it as a one input to ifWithoutElse and other input will be Constant "test" .
3) u can write UDF for this .
Compare the input field with ResultList.CC
if true pass "test" if false pass watever u want
reward points if helpful
Thanks
sunil singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for advice guys, I have configured as follows;
CIMTYP - Exists - IF,
Then CIMTYP - CIMTYP
Constant - Else - CIMTYP
[Test]
However when testing with a null value in the CIMTYP field, 'Test' does not appear in the target.
Am I missing something?
Thanks again,
Raj
Edited by: Raj Hundal on Jun 9, 2008 1:56 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
depends what do you mean with null value.
Exists function tests if there is any value.
For example:
<sourcemessage1>
<sourcevalue>
some value
</sourcevalue>
</sourcemessage1>
<sourcemessage2>
</sourcemessage2>
Using exists for sourcevalue will return true in first case and false in the second case.
If you have a special null value you have to test with the equalsS function like mentioned by Chirag.
Regards
Patrick
Hey,
Use the following functions.
Exists(Node function)->if(boolean function)->then(pass the value)-> else("test")
rewards points if useful.
regards,
Milan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sourcefield>exist()->Ifthenelse
(true) sourcefield---->targetfield
(false) Constant("TEST") --->TargetField
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you could use the exists function with an if function.
if ( exists (source value ) )
then source value
else constant
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.