cancel
Showing results for 
Search instead for 
Did you mean: 

How can I ignore the complete record if any field in record has no value?

Former Member
0 Kudos

Hi

I want to ignore a complete record in a file if any field does not have any value. I get some times some fields do not have value.

But at present if any field does not contain any value then the whole file is rejecting.

I have set the occurances as

Sender DT

--->Record_Node ---> occurance ---> 0..unbound

-


>field1--


>occurance-->0..1 with default 0

-


>field2--


>occurance-->0..1 with default 0

-


>field3--


>occurance-->0..1 with default 0

-


>field4--


>occurance-->0..1 with default 0

I do not want the whole file to be rejected but I want only one record to be deleted or ignored if any field does not contain value and other records data to be sent to receiver.

For eg:

1001 22000 54758 98745

1002 25000 54759 98746

1003 25000 98746

1002 25000 54759 98746

In the above case the third record third column does not have the value and hence the third record need to be deleted. But unfortunatly at present the whole file is getting rejecting.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi,

>>I do not want the whole file to be rejected but I want only one record to be deleted or ignored if any field does not contain value and other records data to be sent to receiver.

Take care of this in message mapping. I will suggest to go for two target structure (same will be their structure). And based on condition differentiate the records in Message Mapping itself. Like this you have a set of successful record and you have another set of failures..

Regards

suraj

Former Member
0 Kudos

Hi Suraj,

I do not want to make it big. If at all any field does not have a value that field can be updated with zero or 0 or else corresponding record values can be deleted.

Thanks much.

Edited by: Mr.Chennai on Sep 10, 2009 3:19 PM

former_member187339
Active Contributor
0 Kudos

Hi,

You meant the output structure should be like:


1001 22000 54758 98745
1002 25000 54759 98746
1003 25000 98746 0
1002 25000 54759 98746 

then try using mapwithdefault (with 0 as the default value) in the fourth field

Regards

Suraj

Former Member
0 Kudos

Yes, I did that. Any field value could be empty. Because the input source will be produced by the machine. In mapping sender data type as well as receiver data type - for all fields i made default value is 0, even then it is not taking any default value and the total file is getting rejecting and even successful data records are also going off.

former_member187339
Active Contributor
0 Kudos

Hi,

I think you have specified default value in Data type fields. try using the node function mapwithdefault in message mapping.

Regards

Suraj

Answers (1)

Answers (1)

Former Member
0 Kudos

managing at proxy level.