How Can i pass Argument from one workflow to another to use in Execute Non Query

Hello Experts,
Am trying to add data from an excel file to two sql database table. The excel file has two sheets. “Sheet 1” goes to table 1 and “Sheet 2” goes to table 2. I have two workflows for this. However i need one column from "sheet 1 "to go to table 2. So I was trying to create an out argument in the first workflow and an in argument in the second workflow for this column so that i can use in execute non query but Its not working

Any ideas of how I can pass this?
Thank you, looking forward to your help

Hi @phionamartinez

  1. First create one variable of type string in Main.xaml file.

  2. In Seq1 workflow, you created out argument right and pass this value to variable the one created in Main.xaml file.

  3. Pass this variable to value to other workflow Seq2.

Have a look on the thread and documentation

Regards
Gokul

Then how do i pass that to the execute non query activity, the query should be an insert into

Hi @phionamartinez

Look into sample Update query → you can modified as Insert query

"UPDATE DBName.TableName SET ColumnName= ('"+Variable name+"') WHERE id = ('"+Variable Name+"')"

Check it out the insert query with variable

INSERT INTO TABLE_NAME (column1, column2, column3)
VALUES (('"+Variable name+"'), ('"+Variable name+"'), ('"+Variable name+"'));

Regards
Gokul

So for the (‘“+variable name+”’) are we putting the argument we passed or the variable that I have created in Main?

You can use variable or argument that has a value in it @phionamartinez

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.