Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

By karl009
#786206
Hi,

Am using PM3 and have setup a custom case list, a Report Table feeds the data but you can only look up one process in the Report Table, what am trying to do is get the Case Labels set and view them on the Inbox folder.

So I have set the starting Activity Propitiates then gone to case labels and set the Description as a variable from the case, I would like to be able to take that Description from all processes and cases and set the case list like the APP_TITLE.

Has any one tried this.

Thanks for any help

Karl
By andreaadamczyk
#814759
Hello karl009,

Well, it is not possible to add a custom case list field with the information of two or more processes because you customize the case list based on the report tables and a report table only holds the information of only one process, so you can only use the variables referred to an specific process.

I hope I have clarified your doubts.

Best regards.
By amosbatto
#814760
karl009 wrote: Thu Jul 28, 2016 6:59 am Am using PM3 and have setup a custom case list, a Report Table feeds the data but you can only look up one process in the Report Table, what am trying to do is get the Case Labels set and view them on the Inbox folder.

So I have set the starting Activity Propitiates then gone to case labels and set the Description as a variable from the case, I would like to be able to take that Description from all processes and cases and set the case list like the APP_TITLE.
You can create a PM Table named PMT_CASE_DESCRIPTION which has the following fields:
APP_UID char(32),
APP_NUMBER int(8),
APP_STATUS varchar(12),
APP_DESCRIPTION varchar(256)

Then use triggers in each process to write information from the current case to that table.

Then use the Custom Case List Builder to add the DESCRIPTION field from the PM Table as a column in your case list.

The trigger to write to the PMT_CASE_DESCRIPTION table would be something like this:
Code: Select all
//get info about the current case:
$oCase = new Cases();
$caseId = @@APPLICATION;
$aCase = $oCase->LoadCase($caseId, @%INDEX);
$description =  mysql_real_escape_string($aCase['APP_DESCRIPTION']);

//check if a record for the current case already exists in the PM Table:
$sql = "SELECT * FROM PMT_CASE_DESCRIPTION WHERE APP_UID='$caseId'";
$result = executeQuery($sql);

if (empty($result)) {
   //insert a new record:
   $insert = "INSERT INTO PMT_CASE_DESCRIPTION (APP_UID, APP_NUMBER, APP_STATUS, APP_DESCRIPTION)
        VALUES ('$caseId', {$aCase['APP_NUMBER']}, '{$aCase['APP_STATUS']}', '$description')";
   executeQuery($insert);
}
else { //update the existing record:
   $update = "UPDATE PMT_CASE_DESCRIPTION 
       SET  APP_STATUS='{$aCase['APP_STATUS']}', APP_DESCRIPTION='$description' 
       WHERE APP_UID='$caseId'";
   executeQuery($update);
}
Set this trigger to fire at various points in your processes.

Thanks Amos Perfect, you were right, my variable […]

Hi, I've written a trigger with the following con[…]

What version of PM are you using? You should use a[…]

First of all, do you know PHP and JavaScript? If […]