- Thu Oct 18, 2018 1:00 am
#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,
Yuan
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
Any ideas?$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;
}
Yuan