Power Apps中通过Power Automate获取文件/文件夹并在Gallery展示时遇类型错误求助
Power Apps中通过Power Automate获取文件/文件夹并在Gallery展示时遇类型错误求助
我跟着好几篇在线指南尝试实现需求,但结果总是达不到预期。目前最接近的方案是使用Power Automate(流名称:PAFolderRtn),具体步骤如下:
- 调用「Get files (properties only)」动作获取文件属性
- 添加「Select」动作,只筛选出我需要的列
- 通过「Respond to a PowerApp or flow」返回文本格式的输出,内容如下:
{ "rtntm": "2023-11-20T13:03:34.5025608Z", "rtnoutput": { "body": [ { "FileNameExt": "Delivery Partner", "isFolder": "True", "Path": "CDS/3_Service Area/" }, { "FileNameExt": "CDS_ElectricCar_BookingSheet.xlsx", "isFolder": "False", "Path": "CDS/3_Service Area/" } ] } }
回到Power Apps里,我做了这些设置:
- 按钮的
OnSelect属性:Set(PAFR,PAFolderRtn.Run("/CDS/3_Service Area/")) - 画廊的
Items属性:Table(ParseJSON(PAFR.rtnoutput))
现在遇到了报错:expected string but got object,实在搞不定了,有没有大佬能帮忙看看问题出在哪?
补充说明:我试过直接引用Get Files动作的body作为输出,但还是碰到同样的错误。
备注:内容来源于stack exchange,提问作者Ben Snow
相关产品推荐
相关产品推荐

