Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By alisoroush7
#828783
hello guys,
i have created a process which requester fills a form and choose his department. After that i want to assign the next task to the department manager that was chosen in previous task. how could it be possible?
thanks for your consideration.
User avatar
By kirkwg
#828785
Hi,

Step 1 > Use a trigger put it to "After Dynaform", trigger code is as follows:
Code: Select all
	//--------- locate the DepMgrId given the DepName
        $DEP_NAME = @@user_dept;       //e.g. @@user_dept is <field-id or field variable of user's department> in the form
	$query= "SELECT DEP_MANAGER,DEP_MANAGER FROM DEPARTMENT WHERE ".
		    "DEP_TITLE = '$DEP_NAME'";	
	$result = executeQuery($query);	
	if (is_array($result) and count($result) > 0) {
	   @@dep_mgr_id = $result[1]['DEP_MANAGER'];		//hidden var dep_mgr_id e.g. 656789123..... (uid)
        }	
Step 2 > Put the Uid @@dep_mgr_id into the assignment rule for routing.
Wish you are clear now, cheers.

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]