<div dir="ltr"><div>Hi,<br></div><div>Does anyone know how to dynamically auto-assign Relations? I’ve been trying to assign relations automatically using inbound mapping and assignmentTargetSearch but my current implementation is very rigid:</div><div><br><inbound><br>   <strength>strong</strength><br>   <expression><br>       <assignmentTargetSearch><br>           <targetType>OrgType</targetType><br>           <filter><br>               <q:equal><br>                   <q:path>identifier</q:path><br>                   <expression><br>                       <script><br>                           <code><br>                               String jobStr = basic.stringify(input)<br>                                                                 def tokenizedStr = jobStr.split(',')<br><br>                               if (tokenizedStr[1] == "faculty") {<br>                                   return tokenizedStr[0].toLowerCase()<br>                               }<br>                           </code><br>                       </script><br>                   </expression><br>               </q:equal><br>           </filter><br>           <assignmentProperties><br>               <relation>relation:faculty</relation><br>           </assignmentProperties><br>       </assignmentTargetSearch><br>   </expression><br>   <target><br>       <path>assignment</path><br>   </target><br></inbound></div><div><br></div><div>Suppose I have 4 different relations and I want to assign relations to the user depending on the 2nd part of the user's job string but the code above only works for the relation faculties. Is there a way of doing this without having to copy-paste the code 3 more times, each time with a different relation?</div><div><br></div><div>Many thanks and best regards,</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Chak Hon Lam<br></div></div></div></div>