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
#824083
Hi,

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=$result->fetch_object()->ponum;
@@PONumber = 'T4G-PO-'[email protected]@PONumber;
$result->free();
User avatar
By amosbatto
#824089
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
#824105
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.

Hi, Is there any way to show my custom column only[…]

Send for clarification

Hi, I know this is an old post but i could not fin[…]

add dropdown to search process

Please replay if there is any solution!!!!

Amosbatto, PMUsers.com is down.

Hi Amos, I appreciate you setting up a tips and t[…]