Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#817432
Hi Amo,

I was using PM 3.2.2, and in my process, there is a web-entry form which will be sent to admin officer for approval.

I only have upload controls in a grid in the "Approval Task" (this is an Fill to fill a form task), and admin officer open the form via link to upload the documents which will be sent to the next user.

The problem is the trigger I used to find the link of the attachment only work for the web-entry form, not a "Link to fill a form", the result is that I got nothing for the link.

Please see the trigger below,
Code: Select all
$appUid = @@APPLICATION;

$query = "SELECT D.*, C.CON_VALUE 
        FROM CONTENT C, APP_DOCUMENT D 
        WHERE D.APP_DOC_UID = C.CON_ID
         AND D.APP_UID = '".$appUid."'
        AND C.CON_CATEGORY = 'APP_DOC_FILENAME'
        AND C.CON_LANG = '".@@SYS_LANG."'";

$result = executeQuery($query);
$dataGrid = array();
$i = 1;
foreach ($result as $row) {
   $ext = explode('.',$row['CON_VALUE']);
   
   $server = (G::is_https() ? 'https://':'http://' [^]) . $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'];
   
   $inputDocPath = $server . PATH_SEP . 'sys' . @@SYS_SYS . PATH_SEP . @@SYS_LANG . PATH_SEP . @@SYS_SKIN . PATH_SEP . 'cases' . PATH_SEP. 'cases_ShowDocument?a='. $row['APP_DOC_UID'];
   
  $aUser = userInfo($row['USR_UID']);
  $uploader = $aUser['firstname'] .' '. $aUser['lastname'] .' ('. $aUser['username'] . ')';

   $dataGrid[$i] = array(
      'fileName' => $row['CON_VALUE'],
      'fileLink' => $inputDocPath,
      'uploader' => $uploader,
      'date' => $row['APP_DOC_CREATE_DATE'],
   );
   $i++;
}

if (is_array($dataGrid) && count($dataGrid) > 0) {
   @=FilesList = $dataGrid;
}
Any ideas?
Yuan
#817592
What is the content of @=FilesList after that trigger?

Verify that records are being created in the APP_DOCUMENT table for the files. There were a bunch of changes with Web Entry in 3.2.2. If I remember correctly, MultipleFile fields work in Web Entry in 3.2.2 and later, but you should verify this by checking the database.

If the files exist in the database and the information in @=FilesList is correct, then see this to be able to download files:
https://wiki.processmaker.com/3.2/faq#a ... t_download
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[…]