The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Warning on empty coalesce field with ignore in onBefore script

ENo
Tera Contributor

Hello

We have an import with coalesce on two fields in the transform map (entity and e-mail address). In the transform map the entity is set by a script to a fixed value, the e-mail address is mapped from the input data. The transform map also have an onBefore script that sets ignore flag to true if the e-mail address is empty or the e-mail address is not within a specific domain. This works as expected (these entries are ignored by the transform map) , but when the e-mail address is empty we also get this warning in the import (and general) logs:

More than one target records exists for target table u_visma_employees with query u_entity=d6a338024713a51068967402e26d4377

The u_entity given here is the correct one from the fixed value set in the mapping. The associated import set row also shows a "random" record in the target table. This is the same record for all imported entries with an empty e-mail address and it seems that it looks up an entry in the target table based on only the entity field which will give multiple hits hence the warning.

Question is why does it do this when the ignore flag is set to true in the onBefore script?

And is it possible to avoid this?

 

2 REPLIES 2

B Winegardner
Tera Contributor

Were you able to resolve this issue?  I am experiencing the same problem.

We resolved this by using a script base mapping that always returns a value for the e-mail address even though the input is empty. This means that if the input e-mail address is empty, the script returns a "silly" text that will not match any record.