前言
SharePoint在实现需求时候经常会用到工作流(SharePoint workflow),在工作流中经常会通过rest api来获取其他相关list中的数据,那么肯定会用到SharePoint workflow中的call
webservice,接下来一起了解一下如何通过call webservice在工作流中获取其他list的数据
实现步骤图例
先看一下具体实现的打开步骤,从下图可以看出只需要4步就可以实现了
详细描述
1、第一步:定义request header,点击Build后面的{...},然后根据下图进行设置即可
Accept | application/json;odata=verbose |
Content-Type | application/json;odata=verbose |
如下为request header在工作流中使用的描述
2、第二步:定义SharePoint rest api请求地址
请求地址可参考:【Sharepoint】SharePoint rest api查询自定义列表(custom list)数据时,把日期作为筛选条件,通过时间范围进行查找的方法与rest api的格式
https://SharePoint url/_vti_bin/listdata.svc/Delegations?$select=*&$filter= OrgId eq 230 and StartDate le datetime'2020-11-14T01:00:00Z' and EndDate ge datetime'2020-11-14T01:00:00Z'
3、call webservice action方法介绍
可以通过action找到call Http web service,然后插入到工作流中进行使用
call webservice参数说明
4、获取请求返回结果
格式为:d/results/(0)/DelegatorId
至此,SharePoint workflow通过call webservice获取其他list的数据的具体步骤就了解完了,如上描述如有错漏,请大家评论区及时留言纠正,多谢