- Thu Aug 23, 2018 11:08 am
#815807
Hi Team,
Please Help me out in the process.
two tables - Table A where the details of field1,field2,minamount,maxamount and approval1,approval2, approval3
Table B where based on field 1 field 2 and title of (approvals) retreive name and email
The user has to select the approval1 based on field1,field2,and amount and then form has to automatically
assign the next approvals assigned.
Assigned a trigger
Assigned a sql statement in the dropdown (for assining approver) as SELECT EMAIL, EMPLOYEENAME FROM TABLEB WHERE FIELD1 = @@field1 AND FIELD2 = @@field2 AND TITLE = @@approval1
Here the value of the variable approval1 from the trigger.is this the correct way to pass the variable?
It is not possible to execute the query. Please contact your system administrator - error for the trigger.
Please guide me towards the process. Appreciate your Help! Thanks
Please Help me out in the process.
two tables - Table A where the details of field1,field2,minamount,maxamount and approval1,approval2, approval3
Table B where based on field 1 field 2 and title of (approvals) retreive name and email
The user has to select the approval1 based on field1,field2,and amount and then form has to automatically
assign the next approvals assigned.
Assigned a trigger
Code: Select all
Don't know whether the code written is correct or not, kind of new to processmaker and PHP.$query = "SELECT MIN_AMOUNT, MAX_AMOUNT, APPROVAL1, APPROVAL2, APPROVAL3, APPROVAL4 FROM TABLE A JOIN TABLEB ON TITLE = APPRROVAL1 WHERE FIELD1 = '".@@field1."' AND FIELD2 = '".@@field2."' ";
$res = executeQuery($query);
if (is_array($res) && count($res) > 0) {
if (( @@value > $res[1]['MIN_AMOUNT']) && (@@value < $res[1]['MAX_AMOUNT'])) {
@@approval1 = $res[1]['APPROVAL1'];
@@approval2 = $res[1]['APPROVAL2'];
@@approval3 = $res[1]['APPROVAl3'];
@@approval4 = $res[1]['APPROVAL4'];
}
}
Assigned a sql statement in the dropdown (for assining approver) as SELECT EMAIL, EMPLOYEENAME FROM TABLEB WHERE FIELD1 = @@field1 AND FIELD2 = @@field2 AND TITLE = @@approval1
Here the value of the variable approval1 from the trigger.is this the correct way to pass the variable?
It is not possible to execute the query. Please contact your system administrator - error for the trigger.
Please guide me towards the process. Appreciate your Help! Thanks