Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By naomikimani

I am working on a trigger to auto-generate a PONumber by linking it to the RFQ number on Processmaker 3.3. However, it keeps sending the error on not connecting to sql server. Below is the trigger I am using:

$RFQNumber = @@RFQNo;

$dbhandle = mysqli_connect('localhost','wf_workflow' , 'f0p54t3bscgh','wf_workflow',"3306") or die("Couldn't connect to SQL Server");

$query = "CALL proc_generateponum('$RFQNumber')";
$result = mysqli_query($dbhandle,$query) or die(mysqli_error());
@@PONumber = 'T4G-PO-'[email protected]@PONumber;
User avatar
By amosbatto
mysqli_connect() y mysqli_query() only works with MySQL. If you are trying to access Microsoft SQL Server, you can use mssql_connect() and mssql_query().

However, it is much easier to create a Database Connection to your MSSQL database and then use ProcessMaker's executeQuery() function in your trigger.
User avatar
By amosbatto
Fredrick wrote: Wed Apr 24, 2019 2:48 am I get the same error - Running ProcessMaker 3.3.1 on Linux, Ubuntu 18.04 and MySQL Version 5.6.4 - available DB engine MySql, mssql extension.
Are you trying to connect to Microsoft SQL Server?
Are you able to create a Database Connection in ProcessMaker which connects to MSSQL ?

If not, then see if your network has a firewall that is blocking traffic and check whether the port being used by MSSQL on the other machine is open. Also try pinging from your processmaker server to your MSSQL server.
set process category static

I want to set process category static, normally th[…]

okay thanks

Amosbatto, is down.

It would be nice if ProcessMaker can let us know w[…]

Hi, What is your server config? Is your server Wi[…]