Unofficial documentation how to do interesting things and work around problems in ProcessMaker

Moderator: amosbatto

Forum rules: Unofficial documentation for features which have not been tested by Quality Assurance or may change in future versions of ProcessMaker
By amosbatto
The setValue() method currently does not work to clear a datetime field.

Until this bug gets fixed, the way to clear a datetime field in ProcessMaker 3 is to use this JavaScript code:
Code: Select all
For example, a DynaForm has a datetime field with the ID of "dueDate". A button is added next to the datetime field with the ID of "clearDate". The following code is used to clear the "dueDate" field:
Code: Select all
$("#clearDate").click( function() {
By ekaboom
Is there a way to clear a date area inside of a grid?

I've got some caculations going on inside my grid, one of which checks to see if the start date isn't after the end date.

Since I also need the date range number, so I just added an alert if dateRange < 0

But I'd also like to clear the rangeEnd number so they have to put it in again.

Since this doesn't work
Code: Select all
      rangeEnd = '';
Is there an alternative I could use to remove the rangeEnd value inside of a grid
(I removed all the other variables to try to make it clear)
Code: Select all
$("form").setOnchange(function(field, newVal, oldVal) {
  var totalRows = $("#grid0001").getNumberRows();
  for (var i = 1; i <= totalRows; i++) {
    rangeStart = moment($("#grid0001").getValue(i, 1));
    rangeEnd = moment($("#grid0001").getValue(i, 2));
    dateRange = rangeEnd.diff(rangeStart, 'days');

    //make sure the user entered valid values:
    if (dateRange < 0) { 
      rangeEnd = '';
      alert('Start Date Is Before End Date.  Change The End Date/Start Date');
    $("#grid0001").setValue(dateRange, i, 21);
By amosbatto
This bug is going to get fixed in the upcoming version 3.2, but if you want to clear the value in a datetime in a grid, then you need to do it this way:
Code: Select all
For example, in a grid with the ID 'clientsList' and a Datetime with the ID "dueDate", you can clear this datetime in the second row this way:
Code: Select all
By amosbatto
This bug has been fixed in PM 3.2 and later. Now it is possible to clear at datetime field with this JavaScript:
Code: Select all
where "mydatetime" is the ID of the datetime field.
By markjustin
Thanks for giving such detailed information. I am really very comfused regarding this topic but my all confusions resolved. Please keep doing.

Hello everyone, Is there a way by which one can c[…]

hey, I want to have link in dynaform which has e[…]

Cookies in Search filter

Hello, Thanks for your reply. I have tested it an[…]

I am currently new to process maker, I set up ever[…]