无法在 Canvas 应用程序中将表类型作为参数传递
我在自定义连接器中调用了此方法,该方法采用参数“项目名称”(它是一个字符串)和主体“assetIds”中的参数(数组类型[12322,22332])。在连接器中测试它时,我能够成功验证并调用。我尝试使用此公式在应用程序内部调用。
customconnectorname.FilterEvents("myprojectname",{assetIds:[
5884566067180248,
4000106819215821
]})
我收到错误,因为数据源需要字符串并且您正在传递 Table.所以我更改并传递了类似的内容
customconnectorname.FilterEvents("myprojectname",{assetIds:5884566067180248})
,现在我收到错误 data source Expected Table 。我想知道我该如何通过这个?传递值的正确方法是什么。在连接器中,这就是我通过的方式及其工作原理:
方法声明
PATH PARAMETERS
project
required
string
QUERY PARAMETERS
assetIds
string <jsonArray(int64)> (JsonArrayInt64)
Example: assetIds=[363848954441724, 793045462540095, 1261042166839739]
Asset IDs of equipment that this event relates to. Format is list of IDs serialized as JSON array(int64). Takes [ 1 .. 100 ] of unique items.
以下是 PowerApps 中的 swagger 定义。 assetId 部分是:
assetIds:
type: array
items: {type: integer, format: int32}
description: assetIds
I have this method called in a custom connector which takes a parameter "project name" which is a string and a parameter in body "assetIds" which is of array kind [12322,22332]. and I am able to validate and call successfully when testing it in the connector. I tried to call inside the app using this using this formulae.
customconnectorname.FilterEvents("myprojectname",{assetIds:[
5884566067180248,
4000106819215821
]})
and I get error as datasource expects string and you are passing Table. so I changed and passed something like this
customconnectorname.FilterEvents("myprojectname",{assetIds:5884566067180248})
and now I get error data source Expected Table . I would like to know how should I pass this ? what is the correct way of passing the value. In connector this is how I pass and it works:
Method declaration
PATH PARAMETERS
project
required
string
QUERY PARAMETERS
assetIds
string <jsonArray(int64)> (JsonArrayInt64)
Example: assetIds=[363848954441724, 793045462540095, 1261042166839739]
Asset IDs of equipment that this event relates to. Format is list of IDs serialized as JSON array(int64). Takes [ 1 .. 100 ] of unique items.
Here is the swagger definition from PowerApps. the assetsId part is :
assetIds:
type: array
items: {type: integer, format: int32}
description: assetIds
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过传递“[id, id, id]”而不是传递“[id, id, id]”?
Have you tried instead of passing [ id, id, id ], do "[id, id, id]"?