Page 1 of 1

Hide Case Grid Columns and add new

Posted: Wed May 15, 2019 9:42 am
by njhajhajha
Hey ,
I am using Process maker 3.3.0 Community Version,
I want to hide default columns (eg:Case,Process,Task,Status....)in home page.
Please let me know If there is any way to achieve this.

Thank You.

Re: Hide Case Grid Columns and add new

Posted: Wed May 15, 2019 11:17 pm
by amosbatto
Hiding columns is easy. Edit workflow/engine/methods/cases/casesListExtJs.php and on line 49 change from:
Code: Select all
$columns = $config['caseColumns'];
$readerFields = $config['caseReaderFields'];
To:
Code: Select all
$columns = $config['caseColumns'];

//remove columns:
unset($columns[5]); //case title 
unset($columns[6]); //process title
unset($columns[7]); //task title

$oNewColumns = array();
foreach ($columns as $column) {
   $oNewColumns[] = $column;
}
$columns = $oNewColumns;

$readerFields = $config['caseReaderFields'];
Then, the case list will display without the process title, task title and case title.

Here is the list of columns stored in the $columns:
Code: Select all
array(11) {
  [0]=>
  array(4) {
    ["header"]=>
    string(1) "#"
    ["dataIndex"]=>
    string(10) "APP_NUMBER"
    ["width"]=>
    int(45)
    ["align"]=>
    string(6) "center"
  }
  [1]=>
  array(5) {
    ["header"]=>
    string(7) "UserUid"
    ["dataIndex"]=>
    string(7) "USR_UID"
    ["width"]=>
    int(50)
    ["hidden"]=>
    bool(true)
    ["hideable"]=>
    bool(false)
  }
  [2]=>
  array(5) {
    ["header"]=>
    string(9) "PreUsrUid"
    ["dataIndex"]=>
    string(16) "PREVIOUS_USR_UID"
    ["width"]=>
    int(50)
    ["hidden"]=>
    bool(true)
    ["hideable"]=>
    bool(false)
  }
  [3]=>
  array(5) {
    ["header"]=>
    string(7) "Summary"
    ["dataIndex"]=>
    string(12) "CASE_SUMMARY"
    ["width"]=>
    int(45)
    ["align"]=>
    string(6) "center"
    ["sortable"]=>
    bool(false)
  }
  [4]=>
  array(5) {
    ["header"]=>
    string(10) "Case Notes"
    ["dataIndex"]=>
    string(16) "CASE_NOTES_COUNT"
    ["width"]=>
    int(45)
    ["align"]=>
    string(6) "center"
    ["sortable"]=>
    bool(false)
  }
  [5]=>
  array(3) {
    ["header"]=>
    string(4) "Case"
    ["dataIndex"]=>
    string(9) "APP_TITLE"
    ["width"]=>
    int(150)
  }
  [6]=>
  array(3) {
    ["header"]=>
    string(7) "Process"
    ["dataIndex"]=>
    string(13) "APP_PRO_TITLE"
    ["width"]=>
    int(120)
  }
  [7]=>
  array(3) {
    ["header"]=>
    string(4) "Task"
    ["dataIndex"]=>
    string(13) "APP_TAS_TITLE"
    ["width"]=>
    int(120)
  }
  [8]=>
  array(3) {
    ["header"]=>
    string(8) "Due Date"
    ["dataIndex"]=>
    string(17) "DEL_TASK_DUE_DATE"
    ["width"]=>
    int(110)
  }
  [9]=>
  array(3) {
    ["header"]=>
    string(13) "Last Modified"
    ["dataIndex"]=>
    string(15) "APP_UPDATE_DATE"
    ["width"]=>
    int(110)
  }
  [10]=>
  array(3) {
    ["header"]=>
    string(8) "Priority"
    ["dataIndex"]=>
    string(12) "DEL_PRIORITY"
    ["width"]=>
    int(50)
  }
}
Adding new columns is more difficult, I couldn't figure it out in 30 minutes of playing with it, which is my limit for questions that don't come from clients.

I recommend that you either create a plugin to display your own case list or you pay for the Custom Case List Builder.

Re: Hide Case Grid Columns and add new

Posted: Thu May 16, 2019 4:34 am
by njhajhajha
Thank You :)