Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
By azalea45
#783941
Please please please help.

I am very new to Processmaker.

I have a dropdown, that is populated by a external DB. I will want to populate a grid with a trigger when the dropdown's value is changed. I have a simple alert message to show me the new value of the dropdown. My problem is that the trigger doesn't seem to fire. The triggers condition is
Code: Select all
pgm.onchange <> null
(pgm is the name of the dropdown. I have also tried @#pgm) I am sure that I have made some silly error.

Any help will be greatly appreciated

thanks
Aza
By OscarBarrientos
#783946
Hello azalea45,

Try with the function isset instead comparing with null or "!=" instead of "<>".

For more information of conditions follow this link

Regards,

Oscar Barrientos
By azalea45
#783958
Dear All

I have moved on to trying to populate a grid with this trigger. I keep getting the error
syntax error, unexpected 'var' (T_VAR)


I have managed to isolate it to this line of code.
Code: Select all
var grd = getObject("Mods");
I have tried all sorts of ways to get the syntax right, but somewhere i am failing. Please can somebody provide me with some guidance.

Thanks
Aza
By azalea45
#783968
Dear All,
I need to populate a dropdown, in a grid, with data from a DB that the user can select one of the options and then they will provide additional info for that item. I have a trigger. The code for the trigger is
Code: Select all
$pgms = @@pgm;

$db ='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; //UID for database connection to DB
$CaseId = @@APPLICATION;                //UID for the current case 

$result = executeQuery("SELECT ActivityID, ActivityName FROM `tbl_activity` WHERE ActivityNo = '$pgms'", $db);

if (is_array($result) && count($result) > 0){
	@@sAccounts = json_encode($result);
}

var dynaformOnload = function() {
    getField("SelectActivity").length = 0; //remove all existing options
    var aAccounts = eval('(' + getField("sAccounts").value + ')');
  
    if (typeof aAccounts == 'object') {
       var opt;
       for (var i in aAccounts) {
          opt = document.createElement("OPTION");
          opt.value = aAccounts[i].ModuleID;
          opt.text = aAccounts[i].ModuleName;
          getField("SelectActivity").options.add(opt);
       }
    }
When the dynaformOnload is in the trigger the trigger doesn't fire at all. Without that bit of code the variable @@sAccounts receives data.
As soon as I add the second part of the code none of the variables in the trigger are populated.

Aza
By snosov
#784531
You are trying to put Java script into a trigger, which accepts limited php-type of code. You need to create a javascript field on your form and move the JS code there.

A 1xBet clone script is a customizable software so[…]

A Bustabit clone script is a pre-made software sol[…]

Are you looking for ways to pay someone to write m[…]

BC.Game Clone

BC.game clone is a replica of the original BC.game[…]