Body parameter on Execute Stored Procedure (V2) task

Franklim 1 Reputation point
2021-11-29T19:30:07.003+00:00

I need to set “Database name” dynamically, but when I use a variable, the task need a “Body” parameter. What I need to put in Body?

153464-logic-app-execute-procedure.jpg

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
1,821 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ronen Ariely 13,786 Reputation points Microsoft MVP
    2021-11-29T22:55:27.24+00:00

    Hi Franklim,

    When you use the default as in your first image, then the logic apps agent "know" what is the structure of the returned SETs since it check the specific stored procedure in the specific database in the specific server using the connector you configured.

    But when you use a dynamic source of the data, then the logic app must get from you the structure of the returned SET which you want to use. This is the meaning of the body - it is the body structure.

    For example, if my ST returns a single column name n then the body can be : [ { "n": 1 }]

    Here is a full working demo:

    This is my SP :

    create OR ALTER procedure RonenSP as select n = 1 UNION ALL SELECT n = 3  
    GO  
    

    This is the Logic apps:

    153465-image.png

    No comments