โ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