question

MikeStapleton-8685 avatar image
0 Votes"
MikeStapleton-8685 asked MikeStapleton-8685 answered

How can I use the output from an "Execute Stored Procedure (V2)" in a "Create CVS Table" in Logic Apps

I am able to use the output from a "Get Rows (V2)" by using the "Value" from dynamic content. But when I use the "Execute Stored Procedure (V2)" I don't have a "Value" option. The choices from dynamic content are "Body", "Outputparameters", "Resultsets", and "returnCode".
I tried to pass in "Resultsets" I get error msg:

BadRequest. The 'from' property value in the 'table' action inputs is of type 'Object'. The value must be of type 'Array'.

Thanks

azure-logic-apps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MikeStapleton-8685 Thank you for the question. We will review and update at the earliest.

0 Votes 0 ·

1 Answer

MikeStapleton-8685 avatar image
1 Vote"
MikeStapleton-8685 answered

I figured it out.

You need to use "Resultsets" as input to the "Create CSV Table".
Then go into code view and find:

"from": "@body('Execute_stored_procedure_(V2)')['resultsets']"

change it to this:

"from": "@body('Execute_stored_procedure_(V2)')['resultsets']['Table1']"

I had mistakenly assumed that SQL Server and stored procs would work out-of-the-box with Logic Apps.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.