About us
ProcessMaker Inc. is the developer of the ProcessMaker Workflow & BPM Software Suite. Read more
PMFAddCaseNote (@@APPLICATION,@@PROCESS,@@TASK,@@USER_LOGGED,'Before Trigger');
if (!empty(trim(@@uploadFile)))
{
//assign to normal PHP variables, so can be inserted in strings:
$invoiceFile = @@uploadFile;
$caseId = @@APPLICATION;
//query to find the assigned UID for the uploaded file:
$query = "SELECT APP_DOC_UID FROM CONTENT C, APP_DOCUMENT AD " .
"WHERE C.CON_VALUE = '$invoiceFile' AND " .
"AD.APP_DOC_UID = C.CON_ID AND AD.APP_UID = '$caseId'";
$result = executeQuery($query);
PMFAddCaseNote (@@APPLICATION,@@PROCESS,@@TASK,@@USER_LOGGED,'After result');
if (is_array($result) and count($result) > 0)
{
$filePath = "/opt/processmaker/shared/sites/workflow/files/$caseId/" .
$result[1]['APP_DOC_UID'] . '_1.' . pathinfo($invoiceFile, PATHINFO_EXTENSION);
@@imagePath = $filePath;
}
}
$caseId = @@APPLICATION;
$query = "SELECT APP_DOC_UID FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND APP_DOC_TYPE='INPUT' AND APP_DOC_STATUS='ACTIVE'";
$result = executeQuery($query);
if (is_array($result) and count($result) > 0)
{
@@imagePath = '../cases/cases_ShowDocument?a=' . $result[1]['APP_DOC_UID'];
}
askylh wrote:hi,Hi askylh!
what you need :
variable = imagePath,
input document tagged INPUT
dynaform : with an imageField and src set to @@imagePath
a trigger : code below
2 tasks
task1 : set step to input document
task2 : set step to the dynaform and the trigger BEFORE load dynaform
hope it helps
Code: Select all$caseId = @@APPLICATION; $query = "SELECT APP_DOC_UID FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND APP_DOC_TYPE='INPUT' AND APP_DOC_STATUS='ACTIVE'"; $result = executeQuery($query); if (is_array($result) and count($result) > 0) { @@imagePath = '../cases/cases_ShowDocument?a=' . $result[1]['APP_DOC_UID']; }
A 1xBet clone script is a customizable software so[…]
A Bustabit clone script is a pre-made software sol[…]
Are you looking for ways to pay someone to write m[…]