EP: {{url}}/api/1.0/{{workspace}}/light/get-next-step/{{app_uid}}
Return the array value for an input file control.
This commit is contained in:
davidcallizaya
2017-11-01 07:51:17 -04:00
parent 577df23797
commit 08e506dabe

View File

@@ -1696,7 +1696,7 @@ class Cases
} }
foreach ($appData as $key => $val) { foreach ($appData as $key => $val) {
if (in_array($key, $field, true) != false) { if (in_array($key, $field, true) != false) {
$caseVariable[$key] = $appData[$key]; $caseVariable[$key] = $this->getFieldValue($field, $appData[$key]);
if (isset($appData[$key . '_label'])) { if (isset($appData[$key . '_label'])) {
$caseVariable[$key . '_label'] = $appData[$key . '_label']; $caseVariable[$key . '_label'] = $appData[$key . '_label'];
} }
@@ -1717,6 +1717,23 @@ class Cases
} }
} }
/**
* Return the field value to be used in the front-end client.
*
* @param type $field
* @param type $value
* @return type
*/
private function getFieldValue($field, $value)
{
switch ($field['type']) {
case 'file':
return $field['data']['app_doc_uid'];
default:
return $value;
}
}
/** /**
* Get Case Variables * Get Case Variables
* *