如何使用“contains”检查集合是否有json中的日期。找到项目时返回true,在power automte中找不到时返回false

问题描述 投票:0回答:1

如果( 包含(项目('Apply_to_each'),'开始日期'), substring(items('Apply_to_each')['startDate'],0,10), 无效的 )

这对我不起作用

我已经尝试使用包含和不使用包含来更改公式几次,如下所示,但不起作用

if(empty(items('Apply_to_each')?['startDate']), null, substring(items('Apply_to_each')?['startDate'],0,10))

power-automate
1个回答
0
投票

我会检查该 JSON 的输出,看看该日期的格式如何。根据您的本地化,可能是一些 yyyy.MM.dd。有了这些信息,我将使用包含函数和一个字符串,该字符串将出现在(且仅出现在)该日期中。

© www.soinside.com 2019 - 2024. All rights reserved.