Filter Query in Azure logic App

Deepak Mandala 1 Reputation point
2021-07-25T15:41:23.78+00:00

Hi Team

Can someone help me how to filter the data from sql server while fetching using azure logic app and also i need to filter the data HTTP request payload column value

Example : payload example:
{
"tablename": "A"
}

Need to filter data from server using payload table name

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

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2021-07-26T04:39:33.633+00:00

    Hi @Deepak Mandala

    Welcome to Microsoft Q&A! Thanks for posting the question.

    You can use the Get rows (v2) action for SQL Server connector which has the Filter Query parameter that you can specify as per your need.
    Please refer to Get rows (V2) action Aggregation transformation parameter detail for the usage.

    Can you provide more details on this "i need to filter the data HTTP request payload column value". Do you mean once you have the data from Get rows you need to only return the rows rather than the dynamic content return by the Get rows (v2) action. If this is the case then on the next action of your workflow you can use any of the dynamic value that is return from your previous action.

    Update: 7/27

    Request Header while calling the logic app HTTP Post URL that is generated:

    Content-Length: 22  
    Content-Type: application/json; charset=utf-8  
    

    Request Body:

    {  
    	"tablename": "A"  
    }  
    

    The flow will be : When a HTTP request is received --> Parse JSON (use Body output of your previous action) --> Get rows (V2) (each parameter on your input request body from your previous action can now be used as parameter in any of your action.)
    Please click on "Use sample payload to generate schema" and define the JSON payload that you are expecting so the request body JSON schema is created for you in both "When a HTTP request is received" and "Parse JSON" method

    For your reference I am attaching the Code View

    118187-image.png

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.