Akshay
Akshay

Reputation: 559

How to use values passed in HTTP Request in Logic Apps / Assign Values to Logic App Parameters Dynamically

I am trying to make a generic Logic App(LA) to do some processing on some files. Calling the Logic App from ADF and able to pass the correct File Names. However I am not able to use/assign values passed to the Logic App to the parameters defined in the LA. What am I Missing ? Please see the screenshot.

-Thanks

enter image description here

Sample Execution to show the names are passed properly.

enter image description here

Upvotes: 1

Views: 5305

Answers (1)

Hury Shen
Hury Shen

Reputation: 15734

As far as I know, we can't assign PRM_FileName from the body of the request to one parameter. But we can use expression to get the value of PRM_FileName.

The expression should be triggerBody()?['PRM_FileName']. You can also assign PRM_FileName to a variable (for example named var1) and you can use the var1 in your next actions but not use the expression(shown as below screenshot). enter image description here

============================Update===========================

Below is my logic app:

enter image description here

I did everything what you mentioned in your 3 steps except I put the PRM_FileName in the body of the request but not appending it at the end of url.

enter image description here

============================Update 2===========================

Please use same schema with mine:

{
    "type": "object",
    "properties": {
        "PRM_FileName": {
            "type": "string"
        }
    }
}

And then select the PRM_FileName into the variable directly(shown as below screenshot). enter image description here

The expression should be triggerBody()?['PRM_FileName'], but in your screenshot the expression is triggerOutputs()['queries']['PRM_FileName'].

Upvotes: 3

Related Questions