By PipSqueak - Mon Jul 15, 2019 5:03 am
- Mon Jul 15, 2019 5:03 am
#825416
Hi Amos,
Thank you for your assistance. Grids are really, really challenging for me on ProcessMaker. May I please request your help with the following?
1) The attached Quotes.json form generates a grid of 3 rows for every item that requires a quote in the first form. I'd like to make sure the user only check one checkbox for each 3 rows. (please see trigger at the end)
2) Highlight every 3 rows alternatively so that it is easy for users to see
3) Attach only selected quotes in the email to the next assigned user
Thank you.
Thank you for your assistance. Grids are really, really challenging for me on ProcessMaker. May I please request your help with the following?
1) The attached Quotes.json form generates a grid of 3 rows for every item that requires a quote in the first form. I'd like to make sure the user only check one checkbox for each 3 rows. (please see trigger at the end)
2) Highlight every 3 rows alternatively so that it is easy for users to see
3) Attach only selected quotes in the email to the next assigned user
Thank you.
Code: Select all
$gridID = @=techEquipment;
@=gridQuotes = '';
$num = 1;
// Filter array
function filter_by_value ($array, $index, $value){
if(is_array($array) && count($array)>0)
{
foreach(array_keys($array) as $key){
$temp[$key] = $array[$key][$index];
if ($temp[$key] == $value){
$newarray[$key] = $array[$key];
}
}
}
return $newarray;
}
$results = filter_by_value($gridID, 'needQuote', 'Y');
@@countQuotes = count($results);
if (isset($results) and !empty($results) and $results != '[]') {
foreach (range(1, 3) as $i) {
foreach ($results as $key => $result) {
@=gridQuotes[$num] = array(
'reference' => $key,
'optionsQuote' => $result['equipmentType_label'] . '/' . $result['options_label'] . '/' . $result['comment_label']
);
$num++;
@=gridQuotes = orderGrid(@=gridQuotes, 'reference', 'ASC');
}
}
} else {
};
Attachments
(7.56 KiB) Downloaded 222 times