on 11-19-2014 11:46 AM
Hi,
Interface source is "|" deli metered file and it has multiple records in a file. Below attached the source field for reference.
VNT102-NAVN |
VNT102 – ORGANISASJONS_NR |
VNT102 – KUNDE_STATUS |
VNT102 – EFAKTURA_AVTALE |
VNT104-LOKAL_ADRESSE |
VNT104-CITY_NAME |
VNT103-CITY_NAME |
VNT104-POST_NR |
VNT101-NAVN |
VNT101 – FODSELS_NR |
VNT101 – KUNDE_STATUS |
VNT101 – EFAKTURA_AVTALE |
VNT101 is marked as "Person" and VNT102 is marked as "Organization". If VNT101 is populated VNT102 wont populate.
In case both fields are present then I have to suppress that record from file and process the rest of records.
same time If VNT101 filled then VNT103-CITY_NAME field would be copied to target field else VNT104-CITY_NAME
Is it possible without UDF? If we required UDF please provide the code to build
Please let me know the solution and reply if more details required.
Thanks & Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes. it is possible without udf.
VNT101 is marked as "Person" and VNT102 is marked as "Organization". If VNT101 is populated VNT102 wont populate.
In case both fields are present then I have to suppress that record from file and process the rest of records.
you can check both the fields using exists and put AND condition. sample logic. you may need to modify below as per your context.
VNT101-->exists
--> AND-->Not-->createif--record.
VNT102-->exists
same time If VNT101 filled then VNT103-CITY_NAME field would be copied to target field else VNT104-CITY_NAME
use if else condition . you are through.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in that case i would suggest perform this valiation at receiver determination.
you need to simulate the condition in such a way it will error out when both the fields are available.
i wiould suggest share the input payload here so that you will get the correct xpath from others.
Hi Arun,
Is your input having multiple records...header repeats multiple times?
AFAIK - Receiver Determination will check only for the 1st value (if there are multiple)...
Do you want to fail entire file (with multiple records) if Both these VNT101 and VNT102 are present (or only the specific records from entire file)?
Regards,
Azhar
Hi Arun,
It will depend on your requirement..what actions / logic you need to define:
1. Do you want the Entire file to fail if it contains that 2 fields?
---> If yes, you can do it in Message Mapping / Receiver Determination condn check
2. Do you just want to Suppress the Records having those 2 fields and process the rest?
--> If yes, you can achieve this in Message Mapping as suggested above
3. Do you want to pass the records with that 2 fields into a separate message?
---> If yes, you can achieve this using Receiver Determination and pass those records to some other Receiver / Interface based on the conditions
Hope it helps
Regards,
Azhar
if you have mutliple records then you better go with multimapping.
it i will create only allowed records.
Hi Arun,
Please provide more detail about your problem. do you want to convert source flat file to target structure? or you have XML in source?
What is the adapter use in sender side?
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harish,
Yes, I have to convert. Source is "|" deli metered file and am using file adapter at source.
I have one more requirement, In case both VNT101 and VNT102 present, error-ed out the file and do not pass to target.
Target am splitting the file. Am clear about 1:n concept.
Please let me know for more details.
Thanks & Regards
Arun
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.