Refactor output document / 0016759: Output Document pmGrids 0016760: Output Document Variables

Se agrego "Grid variables" a las opciones de Type Variable en el pmVariablePicker, que despliega los campos de las grillas que tiene en el proceso
This commit is contained in:
marcelo.cuiza
2015-05-15 14:44:27 -04:00
parent d00b8a0dff
commit eabfe30c0c
2 changed files with 25 additions and 12 deletions

View File

@@ -428,17 +428,19 @@ function getDynaformsVars ($sProcessUID, $typeVars = 'all', $bIncMulSelFields =
$oData->next();
while ($aRowd = $oData->getRow()) {
$dynaform = G::json_decode($aRowd['DYN_CONTENT'],true);
$items = $dynaform['items'][0]['items'];
foreach($items as $key => $val){
if($val[0]['type'] == 'grid'){
if(sizeof($val[0]['columns'])) {
$columns = $val[0]['columns'];
foreach($columns as $column) {
array_push($aFields, array(
"sName" => $column['name'],
"sType" => $column['dataType'],
"sLabel" => $column['name'] . " [" . $column['dataType']. "]"
));
if(is_array($dynaform) && sizeof($dynaform)) {
$items = $dynaform['items'][0]['items'];
foreach($items as $key => $val){
if($val[0]['type'] == 'grid'){
if(sizeof($val[0]['columns'])) {
$columns = $val[0]['columns'];
foreach($columns as $column) {
array_push($aFields, array(
"sName" => $column['name'],
"sType" => $column['dataType'],
"sLabel" => $column['name'] . " [" . $column['dataType']. "]"
));
}
}
}
}