hi khoer52,
I resolved this with 2 triggers.
My english is not well but I will try to help you with an example.
I will use 2 tasks, task1 and task2, also I will use a grid called grid1 with a text called product and a file called file1, the first triggers will be export all grid name into a table called grind_info.
the table has 3 fields (caseNumber, fileName, fileLink)
first trigger must be in task1 after dynaform.
Code: Select all$sCaseNumber = @@APPLICATION;
$query2 = "SELECT APP_NUMBER FROM application WHERE APP_UID ='$sCaseNumber '";
$result2 = executeQuery($query2);
$sNumber= $result2[1]['APP_NUMBER'];
$aGrid = @=grid1;
foreach ($aGrid as $row) {
$product = $row['product_label'];
$fileName= $row['file1_label'];
$fileName = substr($fileName, 2, -2);
$query3 = "SELECT CONCAT('../cases/cases_ShowDocument?a=', C.CON_ID) as url FROM app_document AD, content C WHERE AD.APP_UID = '$sNumeroCaso' AND AD.APP_DOC_TYPE='ATTACHED' AND AD.APP_DOC_STATUS='ACTIVE' AND AD.APP_DOC_UID=C.CON_ID AND C.CON_CATEGORY='APP_DOC_FILENAME' AND C.CON_VALUE = '$adjuntarOferta' limit 1";
$fileResult = executeQuery($query3);
$fileLink = $fileResult[1][url];
$query = "INSERT INTO grind_info(caseNumber, fileName, fileLink) VALUES ('$sNumber', '$fileName', '$fileLink')";
$result = executeQuery($query);
}
the second trigger must be in the task2 in before dynaform
Code: Select all$sCaseNumber = @@APPLICATION;
$query2 = "SELECT APP_NUMBER FROM application WHERE APP_UID ='$sCaseNumber '";
$result2 = executeQuery($query2);
$sNumber= $result2[1]['APP_NUMBER'];
$query = "select gi.fileName, gi.fileLink from grind_info gi where gi.caseNumber= $sNumber";
$result = executeQuery($query);
if (is_array($result) and count($result) > 0) {
@=grid1= $result;
}
This work for my and I hope that works for you.