<div dir="ltr"><div><div>Hi everyone, I have the following issue: I need to import users from a database table (I'm using the database resource) but first I need to see if the user in the table has the field "email" not null, and if it does, that's the name I want for my user in midpoint. If it doesn't, I user another field of the table (id number). I have configured the resource inbound mapping to map the id number to the name first and I was trying to set the email if not null with an object template, using the following mapping:<br><br>   <mapping><br>      <strength>weak</strength><br>      <source><br>         <name>email</name><br>         <c:path>$user/emailAddress</c:path><br>      </source><br>      <expression><br>         <script><br>            <language><a href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy">http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</a></language><br>            <code><br>            return email.split("@")[0]<br>        </code><br>         </script><br>      </expression><br>      <target><br>         <c:path>name</c:path><br>      </target><br>      <condition><br>         <script><br>            <code><br>                email != null<br>            </code><br>         </script><br>      </condition><br>   </mapping><br><br></div>This isn't working. Any ideas why? The resource is referenced to the template and it's executing it when I import users (I see some other logic applied to the user that is created in midpoint), but not renaming them. Thanks in advance.<br><br></div>Mariano<br></div>