<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Within the scriptedsql groovy scripts, can intent be used? It's the first of this for me, something like</div><div><br></div><div><div>if (intent == 'manager') {</div><div><span style="white-space:pre">  </span>switch (objectClass) {</div><div><span style="white-space:pre">        </span>    case "__ACCOUNT__":</div><div><span style="white-space:pre">   </span>    sql.eachRow("SELECT * FROM table ORDER BY id",</div><div><span style="white-space:pre">        </span>    <span style="white-space:pre">       </span>{result.add([__UID__:<a href="http://it.id">it.id</a>, __NAME__:<a href="http://it.id">it.id</a>,id:<a href="http://it.id">it.id</a>,firstname:it.firstname,lastname:it.lastname,memberOf:it.memberOf.split(";") as List])} </div><div><span style="white-space:pre">     </span>    );</div><div><span style="white-space:pre">      </span>    break</div><div><span style="white-space:pre">   </span></div><div><span style="white-space:pre">      </span>    default:</div><div><span style="white-space:pre">        </span>    result;</div><div><span style="white-space:pre"> </span>}</div><div><span style="white-space:pre">     </span>return result;</div><div>} else {</div><div><span style="white-space:pre"> </span>switch (objectClass) {</div><div><span style="white-space:pre">        </span>    case "__ACCOUNT__":</div><div><span style="white-space:pre">   </span>    sql.eachRow("SELECT * FROM table2 ORDER BY id",</div><div><span style="white-space:pre">       </span>    <span style="white-space:pre">       </span>{result.add([__UID__:<a href="http://it.id">it.id</a>, __NAME__:<a href="http://it.id">it.id</a>,__ENABLE__:!(it.disabled as Boolean),id:<a href="http://it.id">it.id</a>,firstname:it.firstname,initials:it.initials,lastname:it.lastname,memberOf:it.memberOf.split(";") as List])} </div><div><span style="white-space:pre">   </span>    );</div><div><span style="white-space:pre">      </span>    break</div><div><span style="white-space:pre">   </span></div><div><span style="white-space:pre">              </span>case "Organization":</div><div><span style="white-space:pre">        </span>    sql.eachRow("SELECT * FROM orgs ORDER BY guid", </div><div><span style="white-space:pre">     </span>    <span style="white-space:pre">       </span>{result.add([__UID__:it.orgs, __NAME__:<a href="http://it.org">it.org</a>,orgs:<a href="http://it.org">it.org</a>,identifier:it.identifier,description:it.description])}</div><div><span style="white-space:pre">  </span>    );</div><div><span style="white-space:pre">      </span>    break</div><div><span style="white-space:pre">   </span></div><div><span style="white-space:pre">      </span>    default:</div><div><span style="white-space:pre">        </span>    result;</div><div><span style="white-space:pre"> </span>}</div><div><span style="white-space:pre">     </span>return result;</div><div>}</div></div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr">JASON</div></div></div></div></div></div>