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 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://pmlearning.info
Thanks
Last edited by programerboy on Tue Apr 06, 2021 5:53 am, edited 1 time in total.
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
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

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