PowerApps |自定义连接器|缺少动态内容

发布于 2025-02-10 11:53:48 字数 771 浏览 1 评论 0原文

我创建了一个自定义连接器,我正在添加PowerApps和Power Automate。自定义连接器中有一个名为“ getDetails”的动作,可以从端点获取详细信息。端点的响应是动态的。
终点的示例响应:

{
    "data":  {
        //Some Dynamic Content 
    }
}

招摇文件响应定义:

    get:
      responses:
        default:
          description: default
          schema:
            type: object
            properties:
              data: {type: object, description: data}      <---- Since dynamic properties in "data" at run time

问题:
现在,当我在Power Automate中使用自定义连接器时,我将获得数据属性以及动态内容。但是,当我在PowerApps中使用此自定义连接器时,我会获得空数据属性。缺少动态内容。

I have created a custom connector which I am adding in PowerApps and Power Automate. There is one action named "GetDetails" in custom connector to fetch details from an endpoint. Response from an endpoint is dynamic.
Sample response from end point:

{
    "data":  {
        //Some Dynamic Content 
    }
}

Swagger file response definition:

    get:
      responses:
        default:
          description: default
          schema:
            type: object
            properties:
              data: {type: object, description: data}      <---- Since dynamic properties in "data" at run time

Question:
Now when I use custom connector in Power Automate I get data property along with dynamic content. But when I use this custom connector in PowerApps I get empty data property. Dynamic content is missing.
Output in PowerApps

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短叹 2025-02-17 11:53:48

当您说“ ...当我在PowerApps中使用此自定义连接器...”时,您如何使用?很可能您正在使用类似的内容创建一个集合:

ClearCollect(
    colDetails,
    MY_CUSTOM_CONN.GetDetails(someParameter)
)

您可以尝试在clearcollect语句中添加,以查看架构是否需要另一个“级别”。这被称为“点符号”。只是添加一个“。”。对于探索不同的模式级别可能是很大的帮助。


编辑1

hm。如果您已经测试了响应并使用Power Automate(或Postman等)进行了验证,那么我唯一能想到的是:

  1. 从您的clearCollect()中删除json()函数语句。
  • 自定义连接器应该已经返回JSON,没有任何理由(我可以认为)将其在PowerApps端使用变换。
  1. 如果那不起作用,请“重建”自定义连接器中的请求。
  • 从示例中导入 请求
  • 输入正确的动词标题和示例JSON body

When you say "...when I use this custom connector in PowerApps...", how are you using it? Likely, you're creating a Collection using something like:

ClearCollect(
    colDetails,
    MY_CUSTOM_CONN.GetDetails(someParameter)
)

You can try adding a . to the ClearCollect statement to see if the schema needs another "level". This is known as "dot notation". Just adding a "." can be a big help for exploring the different schema levels.


EDIT 1

Hm. If you've tested the response and validated using Power Automate (or Postman, etc.), the only things I can think of are:

  1. Remove the JSON() function from your ClearCollect() statement.
  • The Custom Connector should already be returning JSON, there shouldn't be any reason (I can think of) to use transform it on the PowerApps side.
  1. If that doesn't work, "Rebuild" the Request in the Custom Connector.
  • Import from sample under Request
  • Enter the correct Verb, Headers and a sample JSON Body

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文