Merged in bugfix/PMCORE-1695 (pull request #7464)

PMCORE-1695

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-02-04 20:16:25 +00:00
committed by Julio Cesar Laura Avendaño

View File

@@ -817,6 +817,15 @@ class Variable
//in the current change there is no specific property that indicates
//if the control is in the grid.
if (isset($field->columnWidth)) {
if (!empty($field->dataVariable)) {
//this support the global variable for @?, only access grids
//for access to all variables, replace with '/^\s*@.(.+)\s*$/'
$dataVariable = preg_match('/^\s*@\?(.+)\s*$/', $field->dataVariable, $arrayMatch) ? $arrayMatch[1] : $json->dataVariable;
if (isset($params[$dataVariable]) && is_array($params[$dataVariable])) {
$globalVariables[$dataVariable] = $params[$dataVariable];
$paramsAndGlobal[$dataVariable] = $params[$dataVariable];
}
}
$pmDynaform->fields["APP_DATA"] = $globalVariables;
$field->queryInputData = $paramsAndGlobal;
}