You are viewing limited content. For full access, please sign in.

Question

Question

Getting SQL stored procedure output parameters from custom query activity

asked on November 9, 2018

I have a custom query workflow activity that runs a stored procedure in SQL server. I can pull parameters from the workflow and insert them in to the SQL table however I have been unable to figure out to to store the output parameters from a stored procedure. 

I am confused how I declare the output parameters in workflow to get the output from the SQL stored procedure. The output parameters appear in the workflow token dialog but there are no values stored in them. Could some post an example of what this looks like?

 

0 0

Answer

SELECTED ANSWER
replied on November 10, 2018 Show version history

I have this figured out mostly. It appears there isn't very much specific documentation on performing more complex queries with a custom query option. I was originally using a stored procedure I created, but then decided to strip everything down and start all over. 

In my attached screenshot, you can see how you can get output values from a SQL query (or stored procedure). In this case I wrote the entire query in the workflow custom query activity to eliminate any issues with talking to SQL from workflow. 

One thing important to note, the columns "intakeID" and "intakeguid" both have default values in SQL; intakeID is an identity field, and intakeguid has newID() as it's default value which creates a unique guid. 

 

output.PNG
output.PNG (65.15 KB)
0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.