cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sandeepnmenon
Microsoft
Microsoft

x-ms-dynamic-values parameter failing when used in flows

I created a custom connector which talks to an azure function that I deployed. One of the actions returns a list of json, which is used to get list of dropdown in one of the parameters.

 

In the test window, the action returns the list of json as expected, but while using it in the flow building experience, the following error is shown in the dropdown

 

esort.JPG

 

The JSON body response is of the following format

"[
{\"Name\":\"sakumtip5nov5\",\"DisplayName\":\"sakumtip5Nov5\"},

{\"Name\":\"orgb13e2381\",\"DisplayName\":\"TrailEnvironmentTest\"}
]"

This is the parameter using the list of values as x-ms-dynamic-values

{
            "name": "Organization",
            "in": "header",
            "description": "",
            "required": true,
            "x-ms-url-encoding": "double",
            "x-ms-dynamic-values": {
              "operationId": "GetOrganizationList",
              "value-collection": "value",
              "value-path": "Name",
              "value-title": "DisplayName"
            },
            "x-ms-summary": "Organization Name",
            "type": "string"
          }

This is the operation being referenced

    "/api/GetOrganizationList": {
      "get": {
        "tags": [
          "DataSet"
        ],
        "operationId": "GetOrganizationList",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OrganizationsList"
            }
          },
          "default": {
            "description": "Operation Failed."
          }
        },
        "deprecated": false,
        "x-ms-visibility": "internal",
        "summary": "Get org list",
        "description": "Get list of orgs."
      }
    }

And these are the definitions

  "definitions": {
    "OrganizationsList": {
      "description": "List of organization",
      "type": "object",
      "properties": {
        "value": {
          "description": "List of organizations",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Organization"
          }
        }
      }
    },
    "Organization": {
      "description": "Organization",
      "type": "object",
      "properties": {
        "Name": {
          "description": "Organization name",
          "type": "string"
        },
        "DisplayName": {
          "description": "Organization display name",
          "type": "string"
        }
      }
    }
  }

What am I missing for using the dynamic values?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
sandeepnmenon
Microsoft
Microsoft

 

The JSON body response should be of the format

 

"{
“values” : [
{\"Name\":\"sakumtip5nov5\",\"DisplayName\":\"sakumtip5Nov5\"},
{\"Name\":\"orgb13e2381\",\"DisplayName\":\"TrailEnvironmentTest\"}
]
}"

 

View solution in original post

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi @sandeepnmenon,

 

Could you share a screenshot of your flow?

Please help collect more info, I will either help reproduce the issue or report it on my side.

Hope the following doc on Extend an OpenAPI definition for accustom connector be helpful:

https://docs.microsoft.com/en-us/connectors/custom-connectors/openapi-extensions

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-yamao-msft for the reply.

 

The error as I suspect is nothing to do with the flow, but of the custom connector. The same error is reproed in any flow that I create where I use my custom action.

 

The screenshot of the error is provided in the original message and is also seen in the screenshot below

 

flow3.JPG

sandeepnmenon
Microsoft
Microsoft

 

The JSON body response should be of the format

 

"{
“values” : [
{\"Name\":\"sakumtip5nov5\",\"DisplayName\":\"sakumtip5Nov5\"},
{\"Name\":\"orgb13e2381\",\"DisplayName\":\"TrailEnvironmentTest\"}
]
}"

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,178)