10-20-2022 10:50 PM
hi there,
how can I ignore the mapping if I am not getting any values? example in the below screenshot for the record, there’s no attachment so mapping should not happen. for this example since no attachement its failing in the downstream snaps.
Thanks
Manohar
10-20-2022 11:15 PM
Hi @manohar ,
You can use Filter snap before the mapping and filter out the records that do not have attachment.
BR,
Marjan
10-21-2022 03:38 AM
Thanks @marjan.karafiloski but what @bojanvelevski is said is what I was looking for.
10-21-2022 01:14 AM
Hi @manohar,
If I understand correctly, you don’t need those fields in the final result, if their value is null ?
If that’s the case, you can try the following expression:
sl.ensureArray($attachments.attachment.filter((v,k)=>v!=null))
and map the Target path as $attachments only.
Let me know if this helps,
Bojan
10-21-2022 03:36 AM
Hi @bojanvelevski , that’s right.
But wondering with this approach, how can I avoid the target portion?
Thanks
Manohar