Webinar Macro sc_change_connection

Hello!

Thanks for attending to our live webinar today! I hope that it was helpful for you.

Please find below a link with the recorded video:

http://bit.ly/sc_change_conn

regards,

M?rcia Ara?jo

code used:

============================================================================
Example 1:
EVENT: onValidateSuccess

$field = {login};

$sql = “select group_id from sec_users_groups where login = '” . $field . “’”;
sc_lookup(ds, $sql);

if ({ds[0][0]} == 2)
{
sc_change_connection(“conn_1”, “conn_2”);
}
elseif ({ds[0][0]} == 3)
{
sc_change_connection(“conn_1”, “conn_3”);
}

=================================================================

Example 2:
EVENT: onScriptinit

if ({company} == 2)
{
sc_change_connection(“conn_1”, “conn_2”);
}
elseif ({company} == 3)
{
sc_change_connection(“conn_1”, “conn_3”);
}