cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Problem trying to mix up dynamic fields with dynamic schema

I'm trying for days to build an operation mixing dynamic fields and schema.

The operation has 2 static fields: subject and description. Then it has a field called template, this field is tied with a dynamic value tag and it's working fine, I'm able to fetch the values from my API.

Now it's the hard part when the template is selected I would like to add dynamic fields to the operation. The API is ready, but the request never goes to the API.

 

Does anyone have any example of how to do this? The official Power Automate documentation is really poor in this regard. This is what I have today:

 

This operation is used to fetch the dynamic values for the field template.

 

 

"/v1/integration/power-automate/templates/summaries": {
  "get": {
    "x-ms-visibility": "internal",
    "responses": {
      "200": {
        "description": "OK",
        "schema": {
          "type": "object",
          "required": [
            "summaries"
          ],
          "properties": {
            "summaries": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "name"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "default": {
        "description": "Operation Failed."
      }
    },
    "summary": "List the template summaries",
    "description": "List the current user template summaries.",
    "operationId": "templateSummary",
    "parameters": []
  }
}

 

 

 

 This is my the actual part that I'm having problems:

 

 

"/v1/integration/power-automate/signature-requests": {
  "post": {
    "consumes": [
      "application/json"
    ],
    "tags": [
      "Actions"
    ],
    "responses": {
      "200": {
        "description": "OK"
      },
      "default": {
        "description": "Operation Failed."
      }
    },
    "summary": "Request Signature Using a Template",
    "description": "Send a request signature using a template.",
    "operationId": "signatureRequest",
    "parameters": [
      {
        "in": "body",
        "name": "request",
        "description": "The signature request entity.",
        "schema": {
          "type": "object",
          "required": [
            "subject",
            "description",
            "template"
          ],
          "properties": {
            "subject": {
              "type": "string",
              "description": "Subject line of the email notification."
            },
            "description": {
              "type": "string",
              "description": "Message included in the email notification."
            },
            "template": {
              "type": "string",
              "description": "Use this option to select the template to be used for the signature request.",
              "x-ms-dynamic-values": {
                "operationId": "templateSummary",
                "value-path": "id",
                "value-title": "name",
                "value-collection": "summaries",
                "parameters": {}
              }
            }
          },
          "x-ms-dynamic-schema": {
            "operationId": "signatureRequestSchema",
            "parameters": {
              "id": {
                "parameter": "template"
              }
            },
            "value-path": "fields"
          },
          "x-ms-dynamic-properties": {
            "operationId": "signatureRequestSchema",
            "parameters": {
              "id": {
                "parameterReference": "request/template"
              }
            },
            "itemValuePath": "fields"
          }
        }
      }
    ]
  }
}

 

 

 

This is the field definition:

 

 

"field": {
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "x-ms-summary": "key"
    },
    "name": {
      "type": "string",
      "x-ms-summary": "name"
    }
  }
}

 

 

0 REPLIES 0

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (101,053)