Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

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 GianYagami
#827755
hi, I am creating trigger which is replace dynaform data and also due date & current users based on their input.
Code: Select all
$p_CaseUID = @@issueNumber;

$c = new Cases();
$aCase = $c->loadCase($p_CaseUID);
//update your field data
$aCase['APP_DATA']['due_date'] = @@due_date;
$aCase['APP_DATA']['auditee_group'] = @@auditee_group;
$aCase['APP_DATA']['auditee_department'] = @@auditee_department;
$aCase['APP_DATA']['auditee_email'] = @@auditee_email;
$aCase['APP_DATA']['auditee_name'] = @@auditee_name;
$aCase['APP_DATA']['auditee_level'] = @@auditee_level;
$aCase['APP_DATA']['auditee_uid'] = @@auditee_uid;

$aCase['APP_DATA']['superior_email'] = @@superior_email;
$aCase['APP_DATA']['superior_name'] = @@superior_name;
$aCase['APP_DATA']['superior_level'] = @@superior_level;
$aCase['APP_DATA']['superior_uid'] = @@superior_uid;

$aCase['APP_DATA']['grouphead_email'] = @@grouphead_email;
$aCase['APP_DATA']['grouphead_name'] = @@grouphead_name;

$aCase['APP_DATA']['auditor_manager_email'] = @@auditor_manager_email;
$aCase['APP_DATA']['auditor_manager_name'] = @@auditor_manager_name;

$aCase['APP_DATA']['bc_email'] = @@bc_email;
$aCase['APP_DATA']['bc_level'] = @@bc_level;
$aCase['APP_DATA']['bc_uid'] = @@bc_uid;

$aCase['APP_DATA']['eAuditee'] = @@eAuditee;
$aCase['APP_DATA']['eSuperior'] = @@eSuperior;
$aCase['APP_DATA']['eGroup'] = @@eGroup;
$aCase['APP_DATA']['eBC'] = @@eBC;

//additional data which need to rewrite so it not missing
$aCase['APP_DATA']['actionType'] = 'create';

switch($aCase['TAS_UID']){
	
	case ('3289937495e670706dc3978040523691'):
		$aCase['CURRENT_USER_UID'] = @@auditee_uid;
		$userInfo = userInfo(@@auditee_uid);
		$aCase['CURRENT_USER'] = $userInfo['username'];
		$aCase['DEL_TASK_DUE_DATE'] = @@due_date;
	break;
	
	case ('2737629765e670706acd163090801884'):
		$aCase['CURRENT_USER_UID'] = @@superior_uid;
		$userInfo = userInfo(@@@@superior_uid);
		$aCase['CURRENT_USER'] = $userInfo['username'];
	break;
	
	case ('7895516625e6707072b2042011803722'):
		$aCase['CURRENT_USER_UID'] = @@sec_uid;
		$userInfo = userInfo(@@sec_uid);
		$aCase['CURRENT_USER'] = $userInfo['username'];
	break;
	
	case ('3386295305e67070715aac7070833218'):
		$aCase['CURRENT_USER_UID'] = @@bc_uid;
		$userInfo = userInfo(@@bc_uid);
		$aCase['CURRENT_USER'] = $userInfo['username'];
	break;
}
@__aDebug = $aCase;

@__debug = $c->updateCase($p_CaseUID, $aCase);
as you can see I just replace $aCase['CURRENT_USER'] and $aCase['CURRENT_USER_UID'], also I check it based $aCase['TAS_UID'] so I want to which one must be replaced.
cam on

hello

Subprocess iteration problem

cam on

I am creating an application using the Process Mak[…]

Hi guys, I recently landed into processmaker commu[…]