Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#789654
hey guys,

i am new on processmaker. i am trying to add data to MSSQL from processmaker. does any other method available except for trigger?
my trigger is

$sqlIdata = "INSERT INTO COUNTRY(
M_1,
M_2,
M_3,
M_4
)VALUES(
'".@@textVar1."',
'".@@textVar3."',
'".@@textVar."',
'".@@textVar4."'
)";
executeQuery($sqlIdata);


its working with PM_TABLE but not working with MSSQL. btw i can take information from MSSQL .
how can i save my data to MSSQL from Processmaker?

PS: sory for grammer fail if its exist
PS2: i connected with MSSQL already and have table name country and column name M_1 .2 .3 .4
Last edited by bilalk on Mon Mar 13, 2017 4:33 am, edited 1 time in total.
By bilalk
#789673
amosbatto wrote:You have to include the unique ID to the Database Connection in your query, like this:
Code: Select all
$db = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; //change to your DB Connection
executeQuery($sqlIdata, $db);
See: http://wiki.processmaker.com/3.1/Proces ... uery.28.29
$db = '94073486358c127d53f6389083639840';
executeQuery($sqlIdata, $db);
$sqlIdata = "INSERT INTO ULKELER (
ID,
SORTNAME,
NAME,
PHONECODE
)VALUES(
'".@@textVar1."',
'".@@textVar3."',
'".@@textVar."',
'".@@textVar4."'
)";
executeQuery($sqlIdata);
i did it as like you said. but still didnt add data to MSSQL.
By bilalk
#789674
$db = '94073486358c127d53f6389083639840';
$result = executeQuery("INSERT INTO ULKELER (
ID,
SORTNAME,
NAME,
PHONECODE
)VALUES(
'".@@textVar1."',
'".@@textVar3."',
'".@@textVar."',
'".@@textVar4."'
)", $db);



I tried like that and it worked, ty amosbatto :)

However, it is essential to use it responsibly and[…]

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]