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

Moderators: ArturoRobles, ArturoRobles

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
#827954
hi,

I am replacing APP_DATA to completed case, and of course I backup serialize data to notepad.
I want to replace some value but I can't changed it by API so I use database access to execute it. we changed plan so I must bring back the backup files of APP_DATA. but it cause dynaform summary empty and I can't query it by my external application.
User avatar
By RicardoMG
#827960
Hello!

You can use the following code in a trigger:
Code: Select all
$result = executeQuery("SELECT APP_DATA FROM APPLICATION WHERE APP_NUMBER='$caseNo'");
if (is_array($result) and count($result) > 0) {
   $sVars = $result[1]['APP_DATA'];
   $aVars = unserialize($sVars);
   $aVars=>$[variableName] = [value];  
}
with this trigger you will get the app_data, then deserialize update the data then serialize and finally update the database.

Best Regards, Ricardo.
By GianYagami
#827961
RicardoMG wrote: Wed Apr 29, 2020 10:37 am Hello!

You can use the following code in a trigger:
Code: Select all
$result = executeQuery("SELECT APP_DATA FROM APPLICATION WHERE APP_NUMBER='$caseNo'");
if (is_array($result) and count($result) > 0) {
   $sVars = $result[1]['APP_DATA'];
   $aVars = unserialize($sVars);
   $aVars=>$[variableName] = [value];  
}
with this trigger you will get the app_data, then deserialize update the data then serialize and finally update the database.

Best Regards, Ricardo.
Hi Richardo,

I've tried to unserialize by external way (php outside of trigger processmaker) and I found that the serialize format has corrupted. Anyway I can't uses your method because the case is now completed.
REST API Question

I am currently looking at developing a portlet for[…]

Everybody wants to be famous, but nobody wants to […]

Hi, I attached a sample config file, Please check […]

Error clicking on Participated

Hi, I attached a sample config file, Please check […]