本文介绍了使用Azure Logic App根据已创建字段的最大值从SharePoint列表中拾取记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个652行的SharePoint列表.已创建(记录创建的时间戳)和已修改(记录更新的时间戳)是SharePoint列表的两个内置字段.

使用Azure Logic App在本地SQL Server表中暂存所有这652条记录以及 Created Modified 列.我已经在SQL Server中将 Created Modified 列创建为VARCHAR(100).SQL Server表中 Created 列值的示例- 2021-01-15T06:43:00Z

现在,我的目标是从SQL Server表中选择 Max(Created) Max(Modified),并从下一次我希望从中获取值如果SharePoint 已创建字段大于SQL Max(已创建)或SharePoint Modified 字段大于SQL Max(已修改),则返回SharePoint)

使用Azure Logic App可以做到吗?

任何帮助都会受到高度赞赏.预先感谢.

解决方案

此处提供了两个选项供您选择:

1..您可以考虑使用"

"初始化变量"中的表达式动作是: body('Execute_a_SQL_query_(V2)')?['ResultSets']?['Table1'] [0]?['maxcreated']

运行逻辑应用程序,结果显示:

I've a SharePoint List with 652 rows. Created (Record Created Timestamp) and Modified (Record Updated Timestamp) are two inbuilt fields of the SharePoint List.

Staging all these 652 records along with the Created and Modified columns in an on-premise SQL Server Table using Azure Logic App. I've created the Created and Modified columns in SQL Serveras VARCHAR(100). Example of a Created column value in SQL Server table - 2021-01-15T06:43:00Z

Now, my aim is to select Max(Created) and Max(Modified) from the SQL Server table and from the next time I would like to get values from the SharePoint if the SharePoint Created field is greater than SQL Max(Created) or SharePoint Modified field is greater than SQL Max(Modified)

Is this doable using Azure Logic App?

Any help is going to be highly appreciated. Thanks in advance.

解决方案

Here provide two options for you to choose:

1. You can consider to use "When an item is created or modified" trigger of sharepoint connector in your logic app. If this trigger can meet your requirement, you do not need to check the max date of "Created" and "Modified" column.

2. If the trigger in option 1 can't meet your requirement, you can use a query like: select max(created) as maxcreated from table in "Execute a SQL query (V2)" action. Below is my logic app:

The expression in "Initialize variable" action is: body('Execute_a_SQL_query_(V2)')?['ResultSets']?['Table1'][0]?['maxcreated']

Run the logic app, the result shows:

这篇关于使用Azure Logic App根据已创建字段的最大值从SharePoint列表中拾取记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 19:34