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
#827678
I need to create case which is edit another case variables. since they have table report, I am not sure to modify APP_DATA will automatically update their report table.

pls need advise
#827681
Hi,
Please check a code like this:
Code: Select all
<?

//select your cases
$query = "
	SELECT APP_UID, DEL_INDEX
	FROM APP_DELEGATION AD
	WHERE AD.APP_UID = '$caseId' AND AD.DEL_INDEX = '$index'
";
$result = executeQuery($query);
if(is_array($result) && count($result) > 0){
	$c = new Cases();
	foreach($result as $row){
		$aCase = $c->loadCase($row['APP_UID'], $row['DEL_INDEX']);
		//update your field data
		$aCase['APP_DATA']['your_field'] = 'new_data';
		$c->updateCase($row['APP_UID'], $aCase);
	}  
}
https://www.youtube.com/channel/UCYiyz1y8Qf4EZjMXodwH1iw/videos
https://www.linkedin.com/in/pmlearning/
Thanks
By GianYagami
#827694
programerboy wrote: Tue Mar 10, 2020 4:45 pm Hi,
Please check a code like this:
Code: Select all
<?

//select your cases
$query = "
	SELECT APP_UID, DEL_INDEX
	FROM APP_DELEGATION AD
	WHERE AD.APP_UID = '$caseId' AND AD.DEL_INDEX = '$index'
";
$result = executeQuery($query);
if(is_array($result) && count($result) > 0){
	$c = new Cases();
	foreach($result as $row){
		$aCase = $c->loadCase($row['APP_UID'], $row['DEL_INDEX']);
		//update your field data
		$aCase['APP_DATA']['your_field'] = 'new_data';
		$c->updateCase($row['APP_UID'], $aCase);
	}  
}
https://www.youtube.com/channel/UCYiyz1y8Qf4EZjMXodwH1iw/videos
https://www.linkedin.com/in/pmlearning/
Thanks
Woah, thanks mate.

my case also has selection user which is routed to their username, any function to route that? Sorry for addition

I recently completed a book on ProcessMaker - &quo[…]

Hi, In https://wiki.processmaker.com/3.0/Report_T[…]

reopen form in the draft

Hi Admin, I use function:onDeleteRow on grid the[…]

Hi, since bugs.processmaker.com in no longer avail[…]