cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Hi Folks,

What limitations are there in using the Execute SQL Action to pass an INSERT INTO statement to a database? Is this allowed (barring any limitations configured into the database? Will the SQL statement handle Nintex references and translate them just as if I was passing a literal statement?

Thanks in advance!

Best Regards,

Patrick Kelligan

Labels: (2)
0 Kudos
Reply
8 Replies
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Hi Patrick,

yes, you can execute your SQL Command and Nintex will translate the references with their own values.

Giacomo

Reply
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Thanks for the quick reply Giacomo Gelosi!

0 Kudos
Reply
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Hi Giacomo!

I'm trying to excute INSERT command, something like that:

INSERT INTO SP_List (Title) VALUES ('{ItemProperty:Title}')

The connection with database works well, but Nintext doesn't manage the reference value properly. Instead of this, the SQL writes into the databe the name of the property itself. In this case: {ItemProperty:Title}

In case of the property is a number, the INSERTquery fails because the passed value is not a number, is the name of the property.

Could you help me?

0 Kudos
Reply
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Hi ‌,

could you post a screenshot of your Execute SQL Action? I'm wondering how have you added the reference to the item property..have you used "Insert Reference" button or have you written it by yourself?

0 Kudos
Reply
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Hi Giacomo, thanks for your attention:

I have used in this case "Insert Reference".

When i try to run the query:

The expected value is a string, but in my opinion, the underlying value inside item property is not passed to the final SQL statement...

In case to include commas '{ItemProperty:Title}', the value passed is the string itself, not the value. In this case there is not error, but the value is wrong!

0 Kudos
Reply
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Hi, using the RunNow you have to change manually the value (the Run Now doesn't know which is the item from whom it has to retrieve the Title property)..

have you tried to execute the workflow to see if it works (maybe you can try with a simpler workflow with just this action and writing to a test table on SQL)?

Reply
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

I'm just now hitting the wall with my head. It works.

Thank you for your help and BR!

0 Kudos
Reply
Workflow Hero

Re: Execute SQL Action: Using an INSERT INTO Statment?

Jump to solution

Happy I've been helpful

0 Kudos
Reply