Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By njhajhajha
#814040
Hey i am new to process maker .....
I have SQL query in trigger which returns user_UID ,whome i want to assign new task.
I have placed ths trigger in before assignment ,but it returns "Task doesn't have a valid user in variable branchuser or this variable doesn't exist. "

Need help!!!
User avatar
By amosbatto
#814048
If you want the currently logged-in user:
Code: Select all
@@nextAssignedUser = @@USER_LOGGED; 
If you want the ID of a particular user:
Code: Select all
$username = 'johndoe';
$sql = "SELECT USR_UID FROM USERS WHERE USR_USERNAME='$username'";
$result = executeQuery($sql);
if (count($result) > 0) {
   @@nextAssignedUser = $result[1]['USR_UID'];
}
else {
   throw new Exception("Unable to find user '$username' in USERS table");
}
Where the variable for Value Based Assignment is @@nextAssignedUser .

Thanks. Very useful. https://www.solarpanelinstal[…]

Thanks for the link, amosbatto! I was searching fo[…]

Hello Please can you help me with the place where […]

Hi there, I have 3.5.7, 3.8.1 and 3.8.2 versi[…]