cancel
Showing results for 
Search instead for 
Did you mean: 

CSV file lines - multiple targets

Former Member
0 Kudos

Hello,

I have a scenario where I need to read lines from my CSV file and route the information from each line as an email to different set of receivers based on the condition in the lines.I'm using XSLT map for the emails. But when there are no records for 11B an empty email is generated..how can I avoid sending that empty email when records are not there..? Please advise.

For example if the csv has four lines..

Customer ID   Dept   Information

A                    11A   absbasb

B                     11B   12232323

C                      11A  adsdsdsd

D                      11B  122233

The email should go to receiver 1(11A) as

Customer ID   Dept   Information

A                    11A   absbasb

C                  11A  adsdsdsd

The email should go to receiver 2(11B) as

B                 11B   12232323
D                  11B  122233

Thank you

Larry.

Accepted Solutions (0)

Answers (3)

Answers (3)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Aber,

Yes, I echo with our colleagues to go for Multi mapping.

Just create two structures for the two receivers and handle which part of data should go to which receiver in graphical mapping itself.

In ID part, you will have a option on what PI should do if the message is empty, there you can check to fail in PI instead of sending empty mail to the corresponding receiver.

Regards

Vishnu

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Aber,


But when there are no records for 11B an empty email is generated..how can I avoid sending that empty email when records are not there..? Please advise.

Depending on the real structure and if there are only two receivers, I think this can be handled in receiver determination by using xpath. Otherwise, if the receivers are dynamic, it is best that you use enhanced receiver determination to prevent sending empty email messages.

Regards,
Mark

former_member193376
Active Contributor
0 Kudos

A suggestion here, Since you are getting a single csv file and based on the records, you need to route them to different receivers. To keep it simple, why dont you go for multimapping and do it through graphical mapping. Here you can easily set the conditions and incase there are no records for (11B) SUPPRESS it. You will have a fixed number of receivers.

Please correct me if there is any other functionality requirement in your case that i am missing.

Regards,

Saiyog