I have a logic app which is triggered manually. The first connector is SQL connector which executes a stored proc and retrieves the data (json array). Now I want to pass this as an input to my custom api app. Below is the snap shot of my custom api method signature
After I add my custom api app I get the below screen. How do I pass the output of my SQL connector as an input to my API app?
Additionally I am confused as to why is the UI displaying me individual properties of my Customer
class. Isn't it supposed to give me one big box to provide the json array input? I also tried entering static values in the input fields but then the option to save the logic app gets grayed out. I tried assigning the value @body('Execute_stored_procedure')['ResultSets']['Table1']
to the body property of the api app in the code view and even after saving it successfully the value is reset to null when I load the designer again.
Below is the sample response from the SQL connector stored proc
{
"body": {
"OutputParameters": {},
"ReturnCode": 0,
"ResultSets": {
"Table1": [
{
"FirstName": "Karen",
"LastName": "Choi",
"EmailAddress": null,
"PhoneNumber": null,
"PostalCode": "98104",
"City": "Seattle",
"Address": "Hidden",
"StateCode": "Washington"
},
{
"FirstName": "Jeanne",
"LastName": "Blake",
"EmailAddress": null,
"PhoneNumber": null,
"PostalCode": "90012",
"City": "Los Angeles",
"Address": "Hidden",
"StateCode": "California"
}
]
}
PS: I am using the new version of the logic apps. My custom API app used to work perfectly with the old version of the logic app.
EDIT
The logic app prevents me to save if I enter the static values on the UI. In the below image the Save option is disabled
EDIT 2
I found a strange behaviour. If I add a condition to the output of SQL connector I can see all the output properties of the SQL Connector.
Why is it that I can't see the same set of properties when I add my custom connector (Figure 2)?