我正在为填充word文档的流工作。我有一个填充了多个项目的表格,但我也想根据ID从sharepoint添加附件。问题是我可能每个项目都有多个图像,所以我不知道如何解决这个问题。感谢您的阅读。祝你今天愉快!
发布于 2021-07-12 12:05:46
当您从sharepoint列表项获得附件时,您有一个数组,然后将此数组传递到“填充MS模板”步骤。Populate MS template
单击此图标,您将更改为接收项目数组。Populate MS template items
发布于 2021-07-15 11:42:54
处理这个问题的正确方法相当复杂。如果你有一个带有4个图像占位符的Microsoft Word模板,那么你每次都需要插入4个图像,否则Flow中的Populate Word Template操作将失败。
试试这个:(从内存中)
defaultImage.jpg file in the Site Assets folder 时放入模板的默认图像
Initialize Variable ( Sharepoint、Array)Initialize Variable ( Number)Get AttachmentsApply to each Attachment Increment Variable 1Append to Array Variable varPhotoArray,varPhotoArray,varCounter))会将Sharepoint中可能存在的0到4个附件放入数组varCounter中
Do until循环之外创建一个新的Apply to each操作varCounter is equal to 4 (或Word Template)Get file content by path中任何最大照片数),并通过1从Site AssetsIncrement Variable Do until抓取defaultImage.jpg文件H265 H166这将用D67填充图像数组,直到图像数量=Site AssetsIncrement Variable中占位符图像的数量varPhotoArray中的位置,并将它们放入模板variables('varPhotoArray')[0]、variables('varPhotoArray')[1]、variables('varPhotoArray')[2]等,其中数值是图像在数组中的位置。https://stackoverflow.com/questions/68303228
复制相似问题