on 09-25-2008 10:10 AM
Hi,
Is it possible to disable a specific node in the target using a condition and User defined function?
Sample scenario:
My target structure is this:
Header
Header fields
Line_items
Line_item fields
my source is a file with a structure of multiple lines.
My condition is... if the source file is empty... the header will be the only one that will print out not the line item. So i need to disable the LINE_ITEM node when the file is empty.
Hi Vincent,
Just to add to Malini's Solution.
Instead of using if then you have to use IfWithoutElse (A standard function available in Boolean).
and set the Property(right click on IfWithouelse) Keeps = true.
It will pass the SUPPRESS node when the condition is false and the Target node will not be created.
srclineitem-->exists-|if WithoutElse(Keeps=true) | -
>tgt_lineitem
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.
Use exists node function
srclineitem---->exists---|if --------->tgt_lineitem
srclineitem-------|then
This ll nt generate the targetline item when src file is empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ofcourse it is possible inside UDF. You just need to use the funtion resultlist.supress();
Your condition here is that if the file is empty, If I understand it correctly, then you dont even need this UDF. If the Line item field is not present in the source at all, it will not populate the target too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
have the occurrence for the line item nodes as 0...1 and map the line item to the source line item. so when source line item doesnot exist ur target node is not created
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.